Enables rights management provided by :class:`fatbotslim.handlers.RightsHandler`.
496593
def enable_rights(self):
        
        if self.rights is None:
            handler_instance = RightsHandler(self)
            self.handlers.insert(len(self.default_handlers), handler_instance)
1047192
def perform_permissions_check(self, user, obj, perms):
        
        return self.request.forum_permission_handler.can_update_topics_to_sticky_topics(obj, user)
1222452
function Save()
    {
        $this->pageRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendSiteRights();
        }
        
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetPageRights($this->pageRights->Rights());
        $this->rights->Save();
    }
644023
def trusted_permission(f):
    """"""

    @functools.wraps(f)
    def wrapper(request, *args, **kwargs):
        trusted(request)
        return f(request, *args, **kwargs)

    return wrapper
1231723
def securityHandler(self, value):
        
        if isinstance(value, BaseSecurityHandler):
            if isinstance(value, security.AGSTokenSecurityHandler):
                self._securityHandler = value
            else:
                pass
        elif value is None:
            self._securityHandler = None
603110
def _delAccountRights(sidObject, user_right):
    '''
    
    '''
    try:
        _polHandle = win32security.LsaOpenPolicy(None, win32security.POLICY_ALL_ACCESS)
        user_rights_list = [user_right]
        _ret = win32security.LsaRemoveAccountRights(_polHandle, sidObject, False, user_rights_list)
        return True
    except Exception as e:
        log.exception('Error attempting to delete account right')
        return False
1139051
def setRightsHolder(self, pid, userId, serialVersion, vendorSpecific=None):
        
        response = self.setRightsHolderResponse(
            pid, userId, serialVersion, vendorSpecific
        )
        return self._read_boolean_response(response)
708634
def handle_rights(self, msg):
        
        command = msg.args[0][1:]
        if command in self.commands_rights:
            if msg.src.name.lower() in self.commands_rights[command]:
                if msg.event not in self.commands_rights[command][msg.src.name.lower()]:
                    msg.propagate = False
            elif '*' in self.commands_rights[command]:
                if msg.event not in self.commands_rights[command]['*']:
                    msg.propagate = False
            if (not msg.propagate) and self.notify:
                message = "You're not allowed to use the '%s' command" % command
                if msg.event == EVT_PUBLIC:
                    self.irc.msg(msg.dst, message)
                elif msg.event == EVT_PRIVATE:
                    self.irc.msg(msg.src.name, message)
                elif msg.event == EVT_NOTICE:
                    self.irc.notice(msg.src.name, message)
113404
def install_handler!(opts={}, &block)
      stat = find_stat(opts, &block)
      raise NoAvailableHandler unless stat
      stat.install
    end
948005
function Save()
    {
        if (!$this->rights)
        {
            $this->rights = new BackendContentRights();
        }
        $this->rights->SetCreateIn($this->Value('CreateIn'));
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetMove($this->Value('Move'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->Save();
    }
287092
def permitted?(requested_flags = 0)
      current_user_roles.any?{|ug| ug.admin?} ||
      current_model_permissions.any?{|cp| cp.permitted?(requested_flags)}
    end
269140
public void setRightsPropagation(Boolean propagation){
		Validate.notNull(propagation);
		props.setProperty(RBACModelProperty.RIGHTS_PROPAGATION.toString(), propagation.toString());
	}
926005
def allow_rwe(self, name):
        """"""
        assert name in PERMISSIONS.keys()
        os.chmod(self.file_path, PERMISSIONS[name]['all'])
304069
function handlePermissions(options) {
            return models.Role.findOne({name: 'Owner'}).then((ownerRole) => {
                return canThis(options.context).assign.role(ownerRole);
            }).then(() => {
                return options;
            });
        }
118494
function Save()
    {
        $this->contentRights->Save();
        if (!$this->rights)
        {
            $this->rights = new BackendPageRights();
        }
        $this->rights->SetCreateIn($this->Value('CreateIn'));
        $this->rights->SetEdit($this->Value('Edit'));
        $this->rights->SetMove($this->Value('Move'));
        $this->rights->SetRemove($this->Value('Remove'));
        $this->rights->SetContentRights($this->contentRights->Rights());
        $this->rights->Save();
    }
621859
def permitted_to? (privilege, options = {}, &block)
      options = {
        :user =>  Authorization.current_user,
        :object => self
      }.merge(options)
      Authorization::Engine.instance.permit?(privilege,
          {:user => options[:user],
           :object => options[:object]},
          &block)
    end
996810
def _is_permitted(self, identifiers, permission_s):
        

        for realm in self.realms:
            # the realm's is_permitted returns a generator
            yield from realm.is_permitted(identifiers, permission_s)