Add perm for editing employee history from profile view

This commit is contained in:
Lance Edgar 2019-07-23 13:12:36 -05:00
parent f1b6f8a3e4
commit b07365b487

View file

@ -260,6 +260,7 @@ class PeopleView(MasterView):
if employee:
for history in sorted(employee.history, key=lambda h: h.start_date, reverse=True):
data.append({
'uuid': history.uuid,
'start_date': six.text_type(history.start_date),
'end_date': six.text_type(history.end_date or ''),
})
@ -375,8 +376,8 @@ class PeopleView(MasterView):
config.add_tailbone_permission_group('people_profile', "People Profile View")
config.add_tailbone_permission('people_profile', 'people_profile.toggle_employee',
"Toggle the person's Employee status")
# config.add_tailbone_permission('people_profile', 'people_profile.edit_employee_history',
# "Edit the person's Employee History records")
config.add_tailbone_permission('people_profile', 'people_profile.edit_employee_history',
"Edit the person's Employee History records")
# view profile
config.add_tailbone_permission(permission_prefix, '{}.view_profile'.format(permission_prefix),