SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 70c757bd authored by George Katsikas's avatar George Katsikas :goat:
Browse files

add profile permission for adding affiliations

parent b20b800b
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
<tr> <tr>
<td>Affiliations <td>Affiliations
<ul> <ul>
<li><a href="{% url 'profiles:affiliation_create' profile_id=profile.id %}">Add a new Affiliation</a></li> {% if perms.scipost.can_add_profile_affiliations %}
<li><a href="{% url 'profiles:affiliation_create' profile_id=profile.id %}">Add a new Affiliation</a></li>
{% endif %}
</ul> </ul>
</td> </td>
<td> <td>
......
...@@ -119,6 +119,11 @@ class Command(BaseCommand): ...@@ -119,6 +119,11 @@ class Command(BaseCommand):
) )
# Profile Management # Profile Management
can_add_profile_affiliations, created = Permission.objects.get_or_create(
codename="can_add_profile_affiliations",
name="Can add affiliations to Profiles",
content_type=content_type,
)
can_merge_profiles, created = Permission.objects.get_or_create( can_merge_profiles, created = Permission.objects.get_or_create(
codename="can_merge_profiles", codename="can_merge_profiles",
name="Can merge Profiles", name="Can merge Profiles",
...@@ -463,6 +468,7 @@ class Command(BaseCommand): ...@@ -463,6 +468,7 @@ class Command(BaseCommand):
can_view_statistics, can_view_statistics,
can_create_profiles, can_create_profiles,
can_view_profiles, can_view_profiles,
can_add_profile_affiliations,
can_merge_profiles, can_merge_profiles,
can_merge_contributors, can_merge_contributors,
can_manage_ontology, can_manage_ontology,
...@@ -526,6 +532,7 @@ class Command(BaseCommand): ...@@ -526,6 +532,7 @@ class Command(BaseCommand):
can_view_statistics, can_view_statistics,
can_create_profiles, can_create_profiles,
can_view_profiles, can_view_profiles,
can_add_profile_affiliations,
can_merge_profiles, can_merge_profiles,
can_merge_contributors, can_merge_contributors,
can_manage_ontology, can_manage_ontology,
...@@ -544,6 +551,7 @@ class Command(BaseCommand): ...@@ -544,6 +551,7 @@ class Command(BaseCommand):
can_take_charge_of_submissions, can_take_charge_of_submissions,
can_create_profiles, can_create_profiles,
can_view_profiles, can_view_profiles,
can_add_profile_affiliations,
can_attend_VGMs, can_attend_VGMs,
can_view_statistics, can_view_statistics,
can_manage_ontology, can_manage_ontology,
...@@ -614,6 +622,7 @@ class Command(BaseCommand): ...@@ -614,6 +622,7 @@ class Command(BaseCommand):
ProductionSupervisors.permissions.set( ProductionSupervisors.permissions.set(
[ [
can_view_profiles, can_view_profiles,
can_add_profile_affiliations,
can_assign_production_officer, can_assign_production_officer,
can_take_decisions_related_to_proofs, can_take_decisions_related_to_proofs,
# can_draft_publication, # can_draft_publication,
......
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