Add perm for editing employee history from profile view
This commit is contained in:
parent
f1b6f8a3e4
commit
b07365b487
|
@ -260,6 +260,7 @@ class PeopleView(MasterView):
|
||||||
if employee:
|
if employee:
|
||||||
for history in sorted(employee.history, key=lambda h: h.start_date, reverse=True):
|
for history in sorted(employee.history, key=lambda h: h.start_date, reverse=True):
|
||||||
data.append({
|
data.append({
|
||||||
|
'uuid': history.uuid,
|
||||||
'start_date': six.text_type(history.start_date),
|
'start_date': six.text_type(history.start_date),
|
||||||
'end_date': six.text_type(history.end_date or ''),
|
'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_group('people_profile', "People Profile View")
|
||||||
config.add_tailbone_permission('people_profile', 'people_profile.toggle_employee',
|
config.add_tailbone_permission('people_profile', 'people_profile.toggle_employee',
|
||||||
"Toggle the person's Employee status")
|
"Toggle the person's Employee status")
|
||||||
# config.add_tailbone_permission('people_profile', 'people_profile.edit_employee_history',
|
config.add_tailbone_permission('people_profile', 'people_profile.edit_employee_history',
|
||||||
# "Edit the person's Employee History records")
|
"Edit the person's Employee History records")
|
||||||
|
|
||||||
# view profile
|
# view profile
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.view_profile'.format(permission_prefix),
|
config.add_tailbone_permission(permission_prefix, '{}.view_profile'.format(permission_prefix),
|
||||||
|
|
Loading…
Reference in a new issue