Add custom permissions for People "profile" view
this whole thing needs some polishing yet...
This commit is contained in:
parent
fa825da404
commit
8c2287a1e8
|
@ -369,6 +369,14 @@ class PeopleView(MasterView):
|
||||||
model_key = cls.get_model_key()
|
model_key = cls.get_model_key()
|
||||||
model_title = cls.get_model_title()
|
model_title = cls.get_model_title()
|
||||||
|
|
||||||
|
# "profile" perms
|
||||||
|
# TODO: should let view class (or config) determine which of these are available
|
||||||
|
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")
|
||||||
|
|
||||||
# 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),
|
||||||
"View full \"profile\" for {}".format(model_title))
|
"View full \"profile\" for {}".format(model_title))
|
||||||
|
|
Loading…
Reference in a new issue