Mercurial > kallithea
changeset 5251:a38e328db172
AuthUser: make get_perms method private
The get_perms method is used exactly once, by the permissions property.
A future, more thorough examination of the code may reveal if it should
stay or go; for now, just make it private. Also, enhance docstring
accuracy.
author | Søren Løvborg <kwi@kwi.dk> |
---|---|
date | Tue, 14 Jul 2015 13:59:59 +0200 |
parents | 3d3bec370fa5 |
children | 815bf70a88ce |
files | kallithea/lib/auth.py kallithea/lib/base.py |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/auth.py Tue Jul 14 13:59:59 2015 +0200 +++ b/kallithea/lib/auth.py Tue Jul 14 13:59:59 2015 +0200 @@ -500,7 +500,7 @@ @LazyProperty def permissions(self): - return self.get_perms(user=self, cache=False) + return self.__get_perms(user=self, cache=False) @property def api_keys(self): @@ -544,13 +544,13 @@ log.debug('Auth User is now %s' % self) - def get_perms(self, user, explicit=True, algo='higherwin', cache=False): + def __get_perms(self, user, explicit=True, algo='higherwin', cache=False): """ Fills user permission attribute with permissions taken from database works for permissions given for repositories, and for permissions that are granted to groups - :param user: instance of User object from database + :param user: `AuthUser` instance :param explicit: In case there are permissions both for user and a group that user is part of, explicit flag will define if user will explicitly override permissions from group, if it's False it will