fix: Add company perm check unconditionally (#34142)
fix: Add employee perm check unconditionally
This commit is contained in:
parent
5e9620b98b
commit
3f2a2c96f6
@ -8,7 +8,6 @@ from frappe.permissions import (
|
||||
get_doc_permissions,
|
||||
has_permission,
|
||||
remove_user_permission,
|
||||
set_user_permission_if_allowed,
|
||||
)
|
||||
from frappe.utils import cstr, getdate, today, validate_email_address
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
@ -96,7 +95,7 @@ class Employee(NestedSet):
|
||||
return
|
||||
|
||||
add_user_permission("Employee", self.name, self.user_id)
|
||||
set_user_permission_if_allowed("Company", self.company, self.user_id)
|
||||
add_user_permission("Company", self.company, self.user_id)
|
||||
|
||||
def update_user(self):
|
||||
# add employee role if missing
|
||||
|
Loading…
x
Reference in New Issue
Block a user