Skip to content
Snippets Groups Projects
Verified Commit 7ea46ed0 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

fix: list only custom permissions

parent e1e7e8bf
No related branches found
No related tags found
No related merge requests found
Pipeline #7223 passed
......@@ -129,7 +129,7 @@ class UserSerializer(serializers.ModelSerializer):
@staticmethod
def get_permissions(obj: User) -> list[str]:
return sorted(
[p.split(".")[1] for p in obj.get_all_permissions() if p.startswith("program")]
[p.split(".")[1] for p in obj.get_all_permissions() if p.startswith("program.edit")]
)
def create(self, validated_data):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment