static string AccessMaskToString(uint granted_access)
        {
            if (_type.HasFullPermission(granted_access))
            {
                return("Full Permission");
            }

            KeyAccessRights      rights   = (KeyAccessRights)(granted_access & 0xFFFF);
            StandardAccessRights standard = (StandardAccessRights)(granted_access & 0x1F0000);

            return(String.Join(", ", new string[] { standard.ToString(), rights.ToString() }));
        }
        static string AccessMaskToString(ObjectTypeInfo type, uint granted_access)
        {
            if (type.HasFullPermission(granted_access))
            {
                return "Full Permission";
            }

            Object rights = Enum.ToObject(GetTypeAccessRights(type), granted_access & 0xFFFF);

            StandardAccessRights standard = (StandardAccessRights)(granted_access & 0x1F0000);

            return String.Join(", ", new string[] { standard.ToString(), rights.ToString() });
        }
Exemplo n.º 3
0
        static string AccessMaskToString(ObjectTypeInfo type, uint granted_access)
        {
            if (type.HasFullPermission(granted_access))
            {
                return("Full Permission");
            }

            Object rights = Enum.ToObject(GetTypeAccessRights(type), granted_access & 0xFFFF);

            StandardAccessRights standard = (StandardAccessRights)(granted_access & 0x1F0000);

            return(String.Join(", ", new string[] { standard.ToString(), rights.ToString() }));
        }
Exemplo n.º 4
0
        static string AccessMaskToString(uint granted_access, bool directory)
        {
            if (_type.HasFullPermission(granted_access))
            {
                return("Full Permission");
            }
            string file_rights;

            if (directory)
            {
                FileDirectoryAccessRights rights = (FileDirectoryAccessRights)(granted_access & 0x1FF);
                file_rights = rights.ToString();
            }
            else
            {
                FileAccessRights rights = (FileAccessRights)(granted_access & 0x1FF);
                file_rights = rights.ToString();
            }

            StandardAccessRights standard = (StandardAccessRights)(granted_access & 0x1F0000);

            return(String.Join(", ", new string[] { standard.ToString(), file_rights }));
        }