This function return the permission name for the user.
163116
def get_permission_name
      permission = CONFIGS[:lato_core][:superusers_permissions].values.select{|x| x[:value] === self.permission}
      return permission[0][:title] if permission && !permission.empty?
    end
893023
def get_permissions(self):
        
        path = Client.urls['all_permissions']
        conns = self._call(path, 'GET')
        return conns
245444
def crud_permission_name(model, action, convert=True):
    
    app_label = model._meta.app_label
    model_lower = model.__name__.lower()
    if convert:
        action = MAP_PERMISSION_ACTIONS.get(action, action)
    return '%s.%s_%s' % (
        app_label,
        action,
        model_lower
    )
384990
def get_user(self):
        
        for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
            user = os.environ.get(name)
            if user:
                break     
        for u in users:
            if u['name'] == user:
                return u['type'], u['name']
609237
def permissions(self):
        """"""
        perms = set()
        for g in self.groups:
            perms = perms | set(g.permissions)
        return perms
631612
def get_required_permissions(self, request):
        
        perms = []

        if not self.permission_required:
            return perms

        if isinstance(self.permission_required, string_types):
            perms = [self.permission_required, ]
        elif isinstance(self.permission_required, Iterable):
            perms = [perm for perm in self.permission_required]
        else:
            raise ImproperlyConfigured(
                '\'PermissionRequiredMixin\' requires \'permission_required\' '
                'attribute to be set to \'<app_label>.<permission codename>\' but is set to {} '
                'instead'.format(self.permission_required)
            )
        return perms
1347708
def get_user_permissions(self, username):
        

        path = Client.urls['user_permissions'] % (username,)
        conns = self._call(path, 'GET')
        return conns
160992
def __getUsername(self):
        """"""

        if self._securityHandler is not None and \
           not self._securityHandler._username is None:
            return self._securityHandler._username
        elif self._securityHandler is not None and \
               hasattr(self._securityHandler, "org_url") and \
               self._securityHandler.org_url is not None:
            from .administration import Administration
            user = Administration(url=self._securityHandler.org_url,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port).portals.portalSelf.user
            return user['username']
        else:
            from .administration import Administration
            url = self._url.lower().split('/content/')[0]
            user = Administration(url=url,
                                  securityHandler=self._securityHandler,
                                  proxy_url=self._proxy_url,
                                  proxy_port=self._proxy_port).portals.portalSelf.user
            return user['username']
308852
def get_user_permissions(uid, **kwargs):
    
    try:
        _get_user(uid)

        user_perms = db.DBSession.query(Perm).filter(Perm.id==RolePerm.perm_id,
                                                  RolePerm.role_id==Role.id,
                                                  Role.id==RoleUser.role_id,
                                                  RoleUser.user_id==uid).all()
        return user_perms
    except:
        raise HydraError("Permissions not found for user (user_id={})".format(uid))
1368929
def user_name(self, user_id):
        """"""
        user = self.users.get(user_id)

        if user is None:
            return "Unknown user ({})".format(user_id)

        return user["name"]
75321
public String[] getUserPermissionList(String userName) {
        if (!m_enabled) {
            return m_perm_list;
        }
        if (userName == null) {
            return new String[] {};
        }
        AuthUser user = getUser(userName);
        if (user == null) {
            return new String[] {};
        }
        return user.m_permissions_list;
    }
559084
def get_all_permissions(self):
        """"""
        perms = set()
        for role in self.get_user_roles():
            for perm_view in role.permissions:
                t = (perm_view.permission.name, perm_view.view_menu.name)
                perms.add(t)
        return perms
456174
def get_user_name():
    

    if sys.platform == 'win32':
        #user = os.getenv('USERPROFILE')
        user = os.getenv('USERNAME')
    else:
        user = os.getenv('LOGNAME')

    return user
88835
def _get_permission_description(permission_name):
    

    parts = permission_name.split('_')
    parts.pop(0)
    method = parts.pop()
    resource = ('_'.join(parts)).lower()
    return 'Can %s %s' % (method.upper(), resource)
853407
def name(self):
        
        uid = self.user_id

        if self._iface_user.get_id() == uid:
            return self._iface.get_my_name()

        return self._iface.get_name(uid)
910959
def get_user_permissions(self, user):
        """"""
        memberShipRecords = AuthMembership.objects(creator=self.client, user=user).only('groups')
        results = []
        for each in memberShipRecords:
            for group in each.groups:
                targetPermissionRecords = AuthPermission.objects(creator=self.client,
                                            groups=group).only('name')

                for each_permission in targetPermissionRecords:
                    results.append({'name':each_permission.name})
        return results
1337935
def get_permissions(self, role):
        """"""
        target_role = AuthGroup.objects(role=role, creator=self.client).first()
        if not target_role:
            return '[]'
        targets = AuthPermission.objects(groups=target_role, creator=self.client).only('name')
        return json.loads(targets.to_json())