/// <summary> /// Sets ACL (Access Control Lists) on files or folders. Like chmod on Linux. /// </summary> /// <param name="configuration"></param> /// <param name="user">The user account that will get access</param> /// <param name="fileOrFolder">The file or folder to configure ACL for</param> /// <param name="accessRights">The access rights to allow</param> /// <returns></returns> public static IOfferRemoteConfiguration Acl(this IOfferRemoteConfiguration configuration, string user, string fileOrFolder, FileSystemRights accessRights) { var op = new AclOperation(user, fileOrFolder, accessRights, new AclOptions.AclOptionsValues()); OperationExecutor.Execute((RemoteBuilder)configuration, op); return(configuration); }
internal static extern IntPtr rd_kafka_AclBindingFilter_new( /* rd_kafka_ResourceType_t */ ResourceType restype, /* const char * */ [MarshalAs(UnmanagedType.LPStr)] string name, /* rd_kafka_ResourcePatternType_t */ ResourcePatternType resource_pattern_type, /* const char * */ [MarshalAs(UnmanagedType.LPStr)] string principal, /* const char * */ [MarshalAs(UnmanagedType.LPStr)] string host, /* rd_kafka_AclOperation_t */ AclOperation operation, /* rd_kafka_AclPermissionType_t */ AclPermissionType permission_type, /* char * */ StringBuilder errstr, /* size_t */ UIntPtr errstr_size);
/// <summary> /// /// </summary> /// <param name="configuration"></param> /// <param name="user">The user account that will get access</param> /// <param name="fileOrFolder">The file or folder to configure ACL for</param> /// <param name="accessRights">The access rights to allow or deny</param> /// <param name="options">Additional ACL options</param> /// <returns></returns> public static IOfferRemoteConfiguration Acl(this IOfferRemoteConfiguration configuration, string user, string fileOrFolder, FileSystemRights accessRights, Action <IOfferAclOptions> options) { var opt = new AclOptions(); if (options != null) { options(opt); } var op = new AclOperation(user, fileOrFolder, accessRights, opt.Values); OperationExecutor.Execute((RemoteBuilder)configuration, op); return(configuration); }