예제 #1
0
파일: util_test.py 프로젝트: luke-rm/h
def test_principals_for_user(user, principals):
    result = util.principals_for_user(user)

    if principals is None:
        assert result is None
    else:
        assert set(principals) == set(result)
예제 #2
0
파일: util_test.py 프로젝트: chinmaygghag/h
def test_principals_for_user(user, principals):
    result = util.principals_for_user(user)

    if principals is None:
        assert result is None
    else:
        assert set(principals) == set(result)
예제 #3
0
    def groups(self):
        """Returns security principals of the logged-in user."""

        if self._userid is None:
            raise AuthTicketNotLoadedError("auth ticket is not loaded yet")

        user = self.usersvc.fetch(self._userid)
        return principals_for_user(user)
예제 #4
0
    def groups(self):
        """Returns security principals of the logged-in user."""

        if self._userid is None:
            raise AuthTicketNotLoadedError('auth ticket is not loaded yet')

        user = self.usersvc.fetch(self._userid)
        return principals_for_user(user)