Exemplo n.º 1
0
        public WsatSecurityModel(string machineName, WsatConfiguration current)
        {
            this.current = current;
            this.machineName = machineName;
            this.objectName = SR.GetString(SR.ACLEditorPageTitle);
            this.pageTitle = SR.GetString(SR.ACLEditorObjectName);

            // we only want to edit permissions (this is the default value anyway)
            objectInformation = new ObjectInfo(
                ObjectInfoFlags.EditPerms | ObjectInfoFlags.Container,
                this.machineName,
                this.objectName,
                this.pageTitle
            );

            if (accessRights == null)
            {
                accessRights = new AccessRightsWrapper();
                accessRights.access = new Access[1];
                // summary page permissions --- AccessFlags.General
                accessRights.access[0] = new Access(WSAT_ALL, SR.GetString(SR.ACLEditorPermissionName), AccessFlags.General);
                // this is de default mask when adding a new ACE --- WSAT_ALL
                accessRights.DefaultIndex = 0;
            }
        }
Exemplo n.º 2
0
        public WsatSecurityModel(string machineName, WsatConfiguration current)
        {
            this.current     = current;
            this.machineName = machineName;
            this.objectName  = SR.GetString(SR.ACLEditorPageTitle);
            this.pageTitle   = SR.GetString(SR.ACLEditorObjectName);

            // we only want to edit permissions (this is the default value anyway)
            objectInformation = new ObjectInfo(
                ObjectInfoFlags.EditPerms | ObjectInfoFlags.Container,
                this.machineName,
                this.objectName,
                this.pageTitle
                );

            if (accessRights == null)
            {
                accessRights        = new AccessRightsWrapper();
                accessRights.access = new Access[1];
                // summary page permissions --- AccessFlags.General
                accessRights.access[0] = new Access(WSAT_ALL, SR.GetString(SR.ACLEditorPermissionName), AccessFlags.General);
                // this is de default mask when adding a new ACE --- WSAT_ALL
                accessRights.DefaultIndex = 0;
            }
        }
Exemplo n.º 3
0
        public void GetAccessRights(
            ref Guid pguidObjectType,
            ObjectInfoFlags dwFlags,
            [MarshalAs(UnmanagedType.LPArray)] out Access[] ppAccess,
            out int pcAccesses,
            out int piDefaultAccess)
        {
            // should set objectType to the pguidObjectType, but we don't need that
            // => we leave objectType as Guid.Empty
            Guid objectType = Guid.Empty;

            AccessRightsWrapper accessRights = model.GetAccessRights(objectType, dwFlags);

            Access[] access = accessRights.access;

            ppAccess        = access;
            pcAccesses      = (int)access.Length;
            piDefaultAccess = (int)accessRights.DefaultIndex;
        }