Skip to content

Commit

Permalink
[oer] Ajuste nas permissões de entrada de dados. #384
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusandrade committed May 30, 2017
1 parent cf697cb commit 3037ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bireme/oer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_context_data(self, **kwargs):
# create flag that control if user have permission to edit the reference
if user_role == 'doc':
# documentalist can create and edit your own records
context['user_can_edit'] = True if not self.object or self.object.created_by == self.request.user else False
context['user_can_edit'] = True if not self.object or ((self.object.created_by == self.request.user) and self.object.status < 1) else False
context['user_can_change_status'] = False
elif user_role == 'edi':
# editor can create, edit and change status (publish) your and institution records
Expand Down

0 comments on commit 3037ea5

Please sign in to comment.