Gets the roles associated with the framework.
160863
public Set<String> roles() {
		return frameworkInfo.hasRole() && !"*".equals(frameworkInfo.getRole()) ?
			Collections.singleton(frameworkInfo.getRole()) : Collections.emptySet();
	}
457247
def roles
      return [] if get_roles.nil?
      x = [get_roles].flatten.map do |role|
        role.respond_to?(:to_sym) ? role.to_sym : role
      end    
      x.first.kind_of?(Set) ? x.first.to_a : x
    end
1222626
def role_entities(self):
        
        return [self.service.roles[name] for name in self.content.roles]
1301052
def roles(*roles) 
      self.valid_roles = Array[*roles].flatten.map { |r| r.to_sym }
    end
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);
        }
    }
170999
def get(self, roleId):
        """"""
        role = db.Role.find_one(Role.role_id == roleId)

        if not role:
            return self.make_response('No such role found', HTTP.NOT_FOUND)

        return self.make_response({'role': role})
442795
@Override
    public Role getRole() {
        return is(NodeFlag.MASTER) ? Role.MASTER : Role.SLAVE;
    }
1251035
public static function getRoles()
    {
        return [
            self::ROLE_MEMBER => Yii::t('podium/view', 'Member'),
            self::ROLE_MODERATOR => Yii::t('podium/view', 'Moderator'),
            self::ROLE_ADMIN => Yii::t('podium/view', 'Admin'),
        ];
    }
467922
def roles(self):
        
        if not self.__roles:
            self.__roles = Roles(self.__connection)
        return self.__roles
939721
def get_current_roles():
    
    current_host = env.host_string
    roledefs = env.get('roledefs')
    if roledefs:
        return [role for role, hosts in six.iteritems(roledefs) if current_host in hosts]
    return []
1226237
@RequestMapping(value = "projects/roles", method = RequestMethod.GET)
    public Resources<ProjectRole> getProjectRoles() {
        return Resources.of(
                rolesService.getProjectRoles(),
                uri(on(PermissionController.class).getProjectRoles())
        );
    }
1334192
private Set<Role> getOtherRolesArg(Object[] arguments) {
        if (arguments.length <= NEW_ROLES_INDEX) {
            log.error("Illegal number of args: " + arguments.length);
        }

        Set<Role> roles = new HashSet<Role>();
        Object[] rolesArray = (Object[]) arguments[NEW_ROLES_INDEX];
        if (null != rolesArray && rolesArray.length > 0) {
            for (Object role : rolesArray) {
                roles.add((Role) role);
            }
        }

        return roles;
    }
371723
@Override
    public List<Role> findRoles() {
        List<Role> roleList;
        try {
            roleList = createRoles(ldapDao.getDirectChildren(DnFactory.roles()));
        } catch (NoSuchNodeException | MissingParentException e) {
            LOGGER.error("LDAP exception", e);
            throw new LdapRuntimeException(e);
        }
        return roleList;
    }
957884
protected function getRoleSets()
    {
        return Util::getRoleSets($this->getUsername(), new String($this->lookupName), new String($this->rolesQuery), $this);
    }
24449
def user_roles(self):
        
        # We do here some lazy loading.
        if not self._user_roles:
            self._user_roles = UserRoleManager(self)
        return self._user_roles
1184991
function getRoles (session) {
    // return roles from session or default
    return session && Array.isArray(session.roles)
        ? session.roles
        // default roles
        : ['all', (session && session.accountId ? 'authenticated' : 'anonymous')]
}
569369
public List<String> getRoles(String path) {
        List<String> roles = super.getRoles(path);
        roles.add(Role.ASSET_DESIGN);
        return roles;
    }