Skip to content

Commit

Permalink
Remove the same user confirmation validation in tallysheets
Browse files Browse the repository at this point in the history
  • Loading branch information
dinukadesilva committed Nov 2, 2019
1 parent c6ac8a7 commit 095abdb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions orm/entities/Submission/TallySheet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ def set_latest_version(self, tallySheetVersion: TallySheetVersion):
self.submission.set_latest_version(submissionVersion=tallySheetVersion.submissionVersion)

def set_locked_version(self, tallySheetVersion: TallySheetVersion):
if DATA_EDITOR_ROLE in get_user_roles() and self.submittedStamp.createdBy == get_user_name():
raise ForbiddenException(
message="Tally sheet submitted user is not allowed to lock/unlock.",
code=MESSAGE_CODE_TALLY_SHEET_SAME_USER_CANNOT_SAVE_AND_SUBMIT
)
# if DATA_EDITOR_ROLE in get_user_roles() and self.submittedStamp.createdBy == get_user_name():
# raise ForbiddenException(
# message="Tally sheet submitted user is not allowed to lock/unlock.",
# code=MESSAGE_CODE_TALLY_SHEET_SAME_USER_CANNOT_SAVE_AND_SUBMIT
# )

if tallySheetVersion is None:
if not has_role_based_access(self, ACCESS_TYPE_UNLOCK):
Expand Down

0 comments on commit 095abdb

Please sign in to comment.