Restores the original permissions of the target pages.

        @type  aProcess: L{Process}
        @param aProcess: Process object.
329130
def __clear_bp(self, aProcess):
        
        lpAddress    = self.get_address()
        flNewProtect = aProcess.mquery(lpAddress).Protect
        flNewProtect = flNewProtect & (0xFFFFFFFF ^ win32.PAGE_GUARD)   # DWORD
        aProcess.mprotect(lpAddress, self.get_size(), flNewProtect)
1351427
def revoke_access(self):
        """"""
        reading = PERMISSIONS['user']['execute'] + PERMISSIONS['group']['execute'] + PERMISSIONS['other']['execute']
        os.chmod(self.file_path, reading)
471808
public function restore() {
        // if database, import database
        if ($this->_hasDatabaseDump()) {
            $this->restoreDatabase();
        } else {
            // Execute a spawn call in batch mode, to make sure all new columns are there
            $spawnCmd = new Garp_Cli_Command_Spawn();
            $spawnCmd->main(array('b' => true, 'only' => 'db'));
        }

        // set permissions on folders
        $this->setWritePermissions();

        // create snippets
        $this->createSnippets();

        // disable under construction
        Garp_Application::setUnderConstruction(false);
    }
1187673
protected void initialize(CmsObject cms) throws CmsRoleViolationException {

        checkFrozen();
        // check if the user has the required permissions
        OpenCms.getRoleManager().checkRole(cms, CmsRole.DATABASE_MANAGER);

        m_frozen = true;
        m_resources = Collections.unmodifiableList(m_resources);
        m_excluderesources = Collections.unmodifiableList(m_excluderesources);
    }
1021346
public function handleClearCacheACL(): void
	{
		if ($this->isAjax()) {
			$this->authorizatorFactory->cleanCache();
			$this->flashNotifier->success('cms.permissions.aclCacheCleared');
		} else {
			$this->terminate();
		}
	}
1313028
def check_permissions(self, request):
        

        for permission in self.get_permissions():
            if not permission.has_permission(request, self):
                self.permission_denied(request, message=getattr(permission, 'message', None))
968361
def set(self, permissions):
        
        parent_url = self.client.get_url(self.parent_object._manager._URL_KEY, 'GET', 'single', {'id': self.parent_object.id})
        target_url = parent_url + self.client.get_url_path(self._URL_KEY, 'PUT', 'multi')
        r = self.client.request('PUT', target_url, json=permissions)
        if r.status_code != 201:
            raise exceptions.ServerError("Expected 201 response, got %s: %s" % (r.status_code, target_url))
        return self.list()
307885
@Override
  public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
                                         @NonNull int[] grantResults) {
    if (requestCode == REQUEST_READ_CONTACTS) {
      if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
        populateAutoComplete();
      }
    }
  }
191292
public void setPermissions(Permissions permissions) {
        if (this.permissions == permissions) {
            return;
        }

        this.removeChildObject("permissions");
        this.permissions = permissions;
        this.addChildObject("permissions", permissions);
    }
112471
private IPermission[] primGetPermissionsForPrincipal(IAuthorizationPrincipal principal)
            throws AuthorizationException {
        if (!this.cachePermissions) {
            return getUncachedPermissionsForPrincipal(principal, null, null, null);
        }

        IPermissionSet ps = null;
        // Check the caching service for the Permissions first.
        ps = cacheGet(principal);

        if (ps == null)
            synchronized (principal) {
                ps = cacheGet(principal);
                if (ps == null) {
                    IPermission[] permissions =
                            getUncachedPermissionsForPrincipal(principal, null, null, null);
                    ps = new PermissionSetImpl(permissions, principal);
                    cacheAdd(ps);
                }
            } // end synchronized
        return ps.getPermissions();
    }
615367
protected void restoreAttributes() {
        if (replacedAttributes != null) {
            for (int scope = 0; scope < replacedAttributes.size(); scope++) {
                Map<String, Object> replaced = replacedAttributes.get(scope);
                for (Map.Entry<String, Object> entry : replaced.entrySet()) {
                    String key = entry.getKey();
                    Object value = entry.getValue();
                    if (value != null) {
                        pageContext.setAttribute(key, value, scope);
                    } else {
                        pageContext.removeAttribute(key, scope);
                    }
                }
            }
        }
    }
82617
def refresh_permissions(permissions):
    """"""
    available_permissions = [x.codename for x in
                             Permission.objects.filter(
                                 codename__startswith=ACL_CODE_PREFIX)]
    active_permissions = permissions.keys()

    perms_to_add = set(active_permissions) - set(available_permissions)
    perms_to_remove = set(available_permissions) - set(active_permissions)

    # Remove deprecated permissions
    for codename in perms_to_remove:
        Permission.objects.filter(codename=codename).delete()

    # Add generated permissions
    ct = ContentType.objects.get_for_model(model=auth_models.User)
    for codename in perms_to_add:
        Permission.objects.get_or_create(codename=codename,
                                         name=permissions[codename],
                                         content_type=ct)
746752
def set_permission(self, path, **kwargs):
        
        response = self._put(path, 'SETPERMISSION', **kwargs)
        assert not response.content
681642
protected void checkPermissionsForMassEdit(CmsObject cms) throws CmsException {

        OpenCms.getRoleManager().checkRoleForResource(cms, CmsRole.ADMINISTRATOR, "/");
    }
629998
public void applyAndCommit(DbSession dbSession, PermissionTemplateDto template, Collection<ComponentDto> projects) {
    if (projects.isEmpty()) {
      return;
    }

    for (ComponentDto project : projects) {
      copyPermissions(dbSession, template, project, null);
    }
    projectIndexers.commitAndIndex(dbSession, projects, ProjectIndexer.Cause.PERMISSION_CHANGE);
  }
296414
public void setWriteAccess(String userId, boolean allowed) {
    if (StringUtil.isEmpty(userId)) {
      throw new IllegalArgumentException("cannot setRead/WriteAccess for null userId");
    }
    boolean readPermission = getReadAccess(userId);
    setPermissionsIfNonEmpty(userId, readPermission, allowed);
  }
171838
@Override
	public synchronized boolean revokeAccess(Principal caller, AccessControl aclEntry)
	{
		if (aclEntry == null)
			return false;

		Principal principal = aclEntry.getPrincipal();

		if (principal == null)
			return false;

		Set<AccessControl> set = this.entries.get(aclEntry.getPrincipal());
		if (set == null || set.isEmpty())
			return false;
		boolean r = set.remove(aclEntry);

		this.entries.put(principal, set);

		return r;
	}