Removes a permission to the view
@method removePermission
@param {string} permission The permission to remove
@param {boolean} negative Flag to set a nagative permission (optional)
@memberof Augmented.View
176015
function(permission, negative) {
            if (!negative) {
              negative = false;
            }
            if (permission !== null && !Array.isArray(permission)) {
              var p = (negative) ? this.permissions.exclude : this.permissions.include;
              p.splice((p.indexOf(permission)), 1);
            }
          }
693206
public static boolean hasPermission(String permission) {
        return getSubject() != null && permission != null
                && permission.length() > 0
                && getSubject().isPermitted(permission);
    }
1060502
private boolean checkPermission(String permission) {
        int res = ctx.checkCallingOrSelfPermission(permission);
        return (res == PackageManager.PERMISSION_GRANTED);
    }
93076
def remove_flag(self, flag):
        
        if self.has_flag(flag):
            del self._flags[flag.lower()]
1167854
public function deletePermission($permission)
    {
        if ($this->hasPermission($permission)) {
            return PermissionRole::where(
                    ['role_id' => $this->id, 'permission_id' => $permission->id]
                )->first()->delete();
        }

        return false;
    }
294384
private void removeFromPermissionsCache(IPermission[] permissions)
            throws AuthorizationException {
        IAuthorizationPrincipal[] principals = getPrincipalsFromPermissions(permissions);
        removeFromPermissionsCache(principals);
    }
1121480
public function removePermission(ChildPermission $permission)
    {
        if ($this->getPermissions()->contains($permission)) { $rolePermission = new ChildRolePermission();

            $rolePermission->setPermission($permission);
            if ($permission->isRolesLoaded()) {
                //remove the back reference if available
                $permission->getRoles()->removeObject($this);
            }

            $rolePermission->setRole($this);
            $this->removeRolePermission(clone $rolePermission);
            $rolePermission->clear();

            $this->collPermissions->remove($this->collPermissions->search($permission));

            if (null === $this->permissionsScheduledForDeletion) {
                $this->permissionsScheduledForDeletion = clone $this->collPermissions;
                $this->permissionsScheduledForDeletion->clear();
            }

            $this->permissionsScheduledForDeletion->push($permission);
        }


        return $this;
    }
262366
public void setRemove(java.util.Collection<LoadPermissionRequest> remove) {
        if (remove == null) {
            this.remove = null;
            return;
        }

        this.remove = new com.amazonaws.internal.SdkInternalList<LoadPermissionRequest>(remove);
    }
828238
function onUnauthorizedAccess() {
          if (angular.isFunction(permission.onUnauthorized)) {
            permission.onUnauthorized()($element);
          } else {
            var onUnauthorizedMethodName = $permission.defaultOnUnauthorizedMethod;
            PermPermissionStrategies[onUnauthorizedMethodName]($element);
          }
        }
268556
public boolean isPermissionGranted(String permission) {
        List<String> grantedPermissions = getPermissions();
        if (grantedPermissions != null) {
            return grantedPermissions.contains(permission);
        }
        return false;
    }
27551
@Override
    public void delete(IPermission[] perms) throws AuthorizationException {
        if (perms.length > 0) {
            try {
                primDelete(perms);
            } catch (Exception ex) {
                log.error("Exception deleting permissions " + Arrays.toString(perms), ex);
                throw new AuthorizationException(
                        "Exception deleting permissions " + Arrays.toString(perms), ex);
            }
        }
    }
350168
public function removeUserPermission($user, $permission)
    {
        $permissions=   $this->findPermissionByKey($permission);
        $user       =   $this->findUserById($user);

        return $user->remove($permission);
    }
116490
function onAuthorizedAccess() {
          if (angular.isFunction(permission.onAuthorized)) {
            permission.onAuthorized()($element);
          } else {
            var onAuthorizedMethodName = $permission.defaultOnAuthorizedMethod;
            PermPermissionStrategies[onAuthorizedMethodName]($element);
          }
        }
220886
public boolean hasPermissionById(String id, Permission permission) {
        return hasPermissionsById(id, ImmutableList.of(permission));
    }
990241
@Override
    public void addPermission(final String permission) {
        CommonHelper.assertNotBlank("permission", permission);
        this.permissions.add(permission);
    }
333408
public function removePermission($permission)
    {
        if ($this->hasPermission($permission)) {
            $index =  array_search($permission, $this->permissions);
            unset($this->permissions[$index]);
        }

        return $this;
    }
514026
private boolean isPermissionGranted(String permission) {
        if (permission == null) {
            throw new IllegalArgumentException("permission is null");
        }

        return context.checkPermission(permission, android.os.Process.myPid(), Process.myUid()) == PackageManager.PERMISSION_GRANTED;
    }