Skip to content

Commit

Permalink
fix(my-orgs): only use active memberships for is_authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
open-dynaMIX committed Jan 10, 2024
1 parent 857a593 commit 1ef7f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/mysagw/identity/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class MyOrgsSerializer(MeSerializer):

def get_is_authorized(self, obj):
identity = self.context["request"].user.identity
return obj.members.filter(identity=identity, authorized=True).exists()
return obj in identity.authorized_for

class Meta:
model = models.Identity
Expand Down

0 comments on commit 1ef7f3f

Please sign in to comment.