diff --git a/attract/auth.py b/attract/auth.py index 24a017f..bb9a598 100644 --- a/attract/auth.py +++ b/attract/auth.py @@ -33,9 +33,9 @@ class Auth(object): def current_user_is_attract_user(self) -> bool: """Returns True iff the current user has Attract User role.""" - from pillar.api.utils.authentication import current_user_id + from pillar.auth import current_user - return self.user_is_attract_user(current_user_id()) + return current_user.has_cap('attract-use') def user_is_attract_user(self, user_id: bson.ObjectId) -> bool: """Returns True iff the user has Attract User role."""