Returns all roles in the specified group for which the caller has read access.  Since the number of roles is
typically low this call does not support "from" or "limit" parameters similar to the system or record.
321810
@GET
    @Path("{group}")
    public Iterator<EmoRole> getAllRolesInGroup(@PathParam("group") String group,
                                                final @Authenticated Subject subject) {
        return _uac.getAllRolesInGroup(subject, group);
    }
26648
def accessibles(self, roles=None):
        
        return [org['slug']
                for org in self.get_accessibles(self.request, roles=roles)]
1000147
def role_groups
      groups = []
      user_account_class.role_groups.map{|k,v| groups << k if user_account.has_any_role?(v)}
      groups
    end
255939
private RoleSet rolesForAccessId(String accessId) {
        RoleSet roles = getRoleSet(accessIdToRoles, accessId);
        if (roles == null) {
            return findRolesForAccessId(accessId);
        } else {
            return roles;
        }
    }
808701
private List<String> getUsersFor(Collection<String> roles){
		List<String> users = new HashList<>();
		for(String role: roles){
			if(roleMembershipRU.containsKey(role))
				users.addAll(roleMembershipRU.get(role));
		}
		return users;
	}
265524
def get_groups(self, load):
        '''
        
        '''
        if 'eauth' not in load:
            return False
        fstr = '{0}.groups'.format(load['eauth'])
        if fstr not in self.auth:
            return False
        fcall = salt.utils.args.format_call(
            self.auth[fstr],
            load,
            expected_extra_kws=AUTH_INTERNAL_KEYWORDS)
        try:
            return self.auth[fstr](*fcall['args'], **fcall['kwargs'])
        except IndexError:
            return False
        except Exception:
            return None
1161812
protected void addAllGroupsToRole(Set<String> groups, String role) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, CLASS_NAME + "addAllGroupsToRole", new Object[] { groups, role });
        }
        Set<String> groupsForTheRole = roleToGroupMap.get(role);
        if (groupsForTheRole != null) {
            groupsForTheRole.addAll(groups);
        } else {
            groupsForTheRole = groups;
        }
        roleToGroupMap.put(role, groupsForTheRole);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, CLASS_NAME + "addAllGroupsToRole");
        }
    }
298255
def get_roles(self):
        

        prefix = _IDENTITY_NS + _ROLE_NS
        rolelist_list = [
            _create_from_bytes(d, identity_pb2.RoleList)
            for _, d in self._state_view.leaves(prefix=prefix)
        ]
        roles = []
        for role_list in rolelist_list:
            for role in role_list.roles:
                roles.append(role)
        return sorted(roles, key=lambda r: r.name)
163823
public function getGroupRoles()
    {
        $roles = [];

        foreach ($this->groups as $group) {
            foreach ($group->getEntityRoles() as $role) {
                if (!in_array($role, $roles)) {
                    $roles[] = $role;
                }
            }
        }

        return $roles;
    }
620565
def _get_roles_query(self, session, identifier):
        
        return (session.query(Role).
                join(role_membership_table, Role.pk_id == role_membership_table.c.role_id).
                join(User, role_membership_table.c.user_id == User.pk_id).
                filter(User.identifier == identifier))
837251
def roles(self):
        """"""
        return Roles(url="%s/roles" % self.root,
                     securityHandler=self._securityHandler,
                     proxy_url=self._proxy_url,
                     proxy_port=self._proxy_port)
1328527
def get_roles(self):
        
        if self.role.exist:
            # return explicitly selected role
            return [self.role]
        else:
            roles = []
            if self.role_query_code:
                #  use given "role_query_code"
                roles = RoleModel.objects.filter(**self.role_query_code)
            elif self.unit.exist:
                # get roles from selected unit or sub-units of it
                if self.recursive_units:
                    # this returns a list, we're converting it to a Role generator!
                    roles = (RoleModel.objects.get(k) for k in
                             UnitModel.get_role_keys(self.unit.key))
                else:
                    roles = RoleModel.objects.filter(unit=self.unit)
            elif self.get_roles_from:
                # get roles from selected predefined "get_roles_from" method
                return ROLE_GETTER_METHODS[self.get_roles_from](RoleModel)

        if self.abstract_role.exist and roles:
            # apply abstract_role filtering on roles we got
            if isinstance(roles, (list, types.GeneratorType)):
                roles = [a for a in roles if a.abstract_role.key == self.abstract_role.key]
            else:
                roles = roles.filter(abstract_role=self.abstract_role)
        else:
            roles = RoleModel.objects.filter(abstract_role=self.abstract_role)

        return roles
1125644
def _get_users_of_group(config, group):
    
    if not group:
        return set()
    fas = fmn.rules.utils.get_fas(config)
    return fmn.rules.utils.get_user_of_group(config, fas, group)
410981
def get_role(self, role):
        
        role = AuthGroup.objects(role=role, creator=self.client).first()
        return role
45010
@GET
    @Path("role")
    @Produces(MediaType.APPLICATION_JSON)
    @HttpCache
    public List<RRoleDto> getRoles()
    {
        DbConn cnx = null;
        try
        {
            cnx = Helpers.getDbSession();
            return MetaService.getRoles(cnx);
        }
        finally
        {
            Helpers.closeQuietly(cnx);
        }
    }
47758
private Collection<Membership> findMembershipsByGroup(Session session, Group group) throws Exception
   {
      Node groupNode;
      NodeIterator refUsers;
      try
      {
         groupNode = utils.getGroupNode(session, group);
         refUsers = groupNode.getNode(JCROrganizationServiceImpl.JOS_MEMBERSHIP).getNodes();
      }
      catch (PathNotFoundException e)
      {
         return new ArrayList<Membership>();
      }

      List<Membership> memberships = new ArrayList<Membership>();
      while (refUsers.hasNext())
      {
         Node refUserNode = refUsers.nextNode();
         memberships.addAll(findMembershipsByUserAndGroup(session, refUserNode, groupNode));
      }

      return memberships;
   }
1188857
def get_role_config_group(resource_root, service_name, name,
    cluster_name="default"):
  
  return _get_role_config_group(resource_root, _get_role_config_group_path(
      cluster_name, service_name, name))