Skip to content

Commit

Permalink
fix: Delete employee user permission
Browse files Browse the repository at this point in the history
  • Loading branch information
niraj2477 committed Oct 17, 2023
1 parent 9d687ca commit acbbdf1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/setup/doctype/employee/employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def on_update(self):

def update_user_permissions(self):
if not self.create_user_permission:
remove_user_permission("Employee", self.name, self.user_id)
remove_user_permission("Company", self.company, self.user_id)
return
if not has_permission("User Permission", ptype="write", raise_exception=False):
return
Expand Down

0 comments on commit acbbdf1

Please sign in to comment.