Esempio n. 1
0
        private void AddPermission(PEAPI.SecurityAction sec_action, object perm, DeclSecurity decl_sec)
        {
            SSPermissionSet ps = perm as SSPermissionSet;

            if (ps != null)
            {
                decl_sec.AddPermissionSet(sec_action, ps);
                return;
            }

            IPermission iper = perm as IPermission;

            if (iper != null)
            {
                decl_sec.AddPermission(sec_action, iper);
                return;
            }

            MIPermissionSet ps20 = perm as MIPermissionSet;

            if (ps20 != null)
            {
                decl_sec.AddPermissionSet(sec_action, ps20);
                return;
            }
        }
Esempio n. 2
0
        public void AddPermission(PEAPI.SecurityAction sec_action, object perm)
        {
            if (CurrentDeclSecurityTarget == null)
            {
                return;
            }

            AddPermission(sec_action, perm, CurrentDeclSecurityTarget.DeclSecurity);
        }