Returns all <code>method-permission</code> elements
@return list of <code>method-permission</code>
7182
public List<MethodPermissionType<AssemblyDescriptorType<T>>> getAllMethodPermission()
   {
      List<MethodPermissionType<AssemblyDescriptorType<T>>> list = new ArrayList<MethodPermissionType<AssemblyDescriptorType<T>>>();
      List<Node> nodeList = childNode.get("method-permission");
      for(Node node: nodeList)
      {
         MethodPermissionType<AssemblyDescriptorType<T>>  type = new MethodPermissionTypeImpl<AssemblyDescriptorType<T>>(this, "method-permission", childNode, node);
         list.add(type);
      }
      return list;
   }
1174637
@Override
    public Collection<Permission> getAllPermissionsFromPermissionSet(String permissionSet)
        throws PermissionSetNotFoundException {
        Collection<Permission> result = new HashSet<Permission>();
        for (String s : getAllPermissionSetsFromPermissionSet(permissionSet)) {
            result.addAll(getPermissionsFromPermissionSet(s));
        }
        return result;
    }
804407
@Override
    public Set<String> getPermissionsForRole(RoleIdentifier id) {
        checkNotNull(id, "id");
        return _delegate.getPermissionsForRole(id);
    }
447988
private static Map<String, Integer> permissions() {

        if (m_permissions == null) {
            LinkedHashMap<String, Integer> permissions = new LinkedHashMap<String, Integer>();
            permissions.put("GUI_PERMISSION_TYPE_READ_0", new Integer(CmsPermissionSet.PERMISSION_READ));
            permissions.put("GUI_PERMISSION_TYPE_WRITE_0", new Integer(CmsPermissionSet.PERMISSION_WRITE));
            permissions.put("GUI_PERMISSION_TYPE_VIEW_0", new Integer(CmsPermissionSet.PERMISSION_VIEW));
            permissions.put("GUI_PERMISSION_TYPE_CONTROL_0", new Integer(CmsPermissionSet.PERMISSION_CONTROL));
            permissions.put(
                "GUI_PERMISSION_TYPE_DIRECT_PUBLISH_0",
                new Integer(CmsPermissionSet.PERMISSION_DIRECT_PUBLISH));
            m_permissions = Collections.unmodifiableMap(permissions);
        }
        return m_permissions;
    }
726122
public Collection<String> getAllowedMethods(String requestMethod) {

		Constraint.ensureNotEmpty(requestMethod, String.format("Invalid method '%s'", requestMethod));
		Set<String> rtAllowedMethods = new HashSet<String>(allowedMethods);
		rtAllowedMethods.add(requestMethod.toUpperCase());

		return rtAllowedMethods;
	}
302810
public static int permissionList2Id(List<Permission> permissions){
        int id = 0;
        if(permissions != null && ! permissions.isEmpty()){
            for (Permission p : permissions) {
                id += p.getId();
            }
        }
        return id;
    }
14514
public Map<String, Map<String, List<String>>> getResourcePermissions() {
		if (resourcePermissions == null) {
			resourcePermissions = new LinkedHashMap<>();
		}
		return resourcePermissions;
	}
1251862
public java.util.List<NetworkInterfacePermission> getNetworkInterfacePermissions() {
        if (networkInterfacePermissions == null) {
            networkInterfacePermissions = new com.amazonaws.internal.SdkInternalList<NetworkInterfacePermission>();
        }
        return networkInterfacePermissions;
    }
555429
public function getAllPermissions(): Collection
    {
        $permissions = $this->permissions;

        if ($this->roles) {
            $permissions = $permissions->merge($this->getPermissionsViaRoles());
        }

        return $permissions->sort()->values();
    }
1255103
@PreAuthorize(
            "hasPermission('ALL', 'java.lang.String', new org.apereo.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))")
    @RequestMapping(value = "/permissions/activities.json", method = RequestMethod.GET)
    public ModelAndView getActivities(@RequestParam(value = "q", required = false) String query) {

        if (StringUtils.isNotBlank(query)) {
            query = query.toLowerCase();
        }

        List<IPermissionActivity> activities = new ArrayList<>();
        Collection<IPermissionOwner> owners = permissionOwnerDao.getAllPermissionOwners();

        for (IPermissionOwner owner : owners) {
            for (IPermissionActivity activity : owner.getActivities()) {
                if (StringUtils.isBlank(query)
                        || activity.getName().toLowerCase().contains(query)) {
                    activities.add(activity);
                }
            }
        }
        Collections.sort(activities);

        ModelAndView mv = new ModelAndView();
        mv.addObject("activities", activities);
        mv.setViewName("json");

        return mv;
    }
882484
public List<RemoveMethodType<SessionBeanType<T>>> getAllRemoveMethod()
   {
      List<RemoveMethodType<SessionBeanType<T>>> list = new ArrayList<RemoveMethodType<SessionBeanType<T>>>();
      List<Node> nodeList = childNode.get("remove-method");
      for(Node node: nodeList)
      {
         RemoveMethodType<SessionBeanType<T>>  type = new RemoveMethodTypeImpl<SessionBeanType<T>>(this, "remove-method", childNode, node);
         list.add(type);
      }
      return list;
   }
637770
private IAuthorizationPrincipal[] getPrincipalsFromPermissions(IPermission[] permissions)
            throws AuthorizationException {
        Set principals = new HashSet();
        for (int i = 0; i < permissions.length; i++) {
            IAuthorizationPrincipal principal = getPrincipal(permissions[i]);
            principals.add(principal);
        }
        return ((IAuthorizationPrincipal[])
                principals.toArray(new IAuthorizationPrincipal[principals.size()]));
    }
1106363
public Collection<Permission> getAggregatePermissions() {
        if (aggregatePermissions == null) {
            Set<Permission> perms = new LinkedHashSet<>();
            perms.addAll(permissions);
            for (Role role : roles) {
                perms.addAll(role.getPermissions());
            }

            if (perms.isEmpty()) {
                aggregatePermissions = Collections.emptySet();
            } else {
                aggregatePermissions = Collections.unmodifiableSet(perms);
            }
        }

        return aggregatePermissions;
    }
1133763
public List<Permission> getPermissions(Principal p) {
		List<Permission> perms = new ArrayList<Permission>();
		lur.fishAll(p, perms);
		return perms;
	}
961887
def get_requested_aosp_permissions(self):
        
        aosp_permissions = []
        all_permissions = self.get_permissions()
        for perm in all_permissions:
            if perm in list(self.permission_module.keys()):
                aosp_permissions.append(perm)
        return aosp_permissions
874691
public List<AccessControlEntry> getPermissionEntries()
   {
      List<AccessControlEntry> list = new ArrayList<AccessControlEntry>();
      for (int i = 0, length = accessList.size(); i < length; i++)
      {
         AccessControlEntry entry = accessList.get(i);
         list.add(new AccessControlEntry(entry.getIdentity(), entry.getPermission()));
      }
      return list;
   }
1272980
public static boolean hasPermission(final String permission) {
        final SecurityContext context = SecurityContextHolder.getContext();
        if (context != null) {
            final Authentication authentication = context.getAuthentication();
            if (authentication != null) {
                for (final GrantedAuthority authority : authentication.getAuthorities()) {
                    if (authority.getAuthority().equals(permission)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }