Fix permissions for add/edit/delete notes from people profile view
This commit is contained in:
parent
3b65b06a3d
commit
9fe585bede
|
@ -394,28 +394,28 @@ class PeopleView(MasterView):
|
||||||
if cls.manage_notes_from_profile_view:
|
if cls.manage_notes_from_profile_view:
|
||||||
|
|
||||||
# add note
|
# add note
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.profile_add_note'.format(permission_prefix),
|
config.add_tailbone_permission('people_profile', 'people_profile.add_note',
|
||||||
"Add new {} note from profile view".format(model_title))
|
"Add new {} Note records".format(model_title))
|
||||||
config.add_route('{}.profile_add_note'.format(route_prefix), '{}/{{{}}}/profile/new-note'.format(url_prefix, model_key),
|
config.add_route('{}.profile_add_note'.format(route_prefix), '{}/{{{}}}/profile/new-note'.format(url_prefix, model_key),
|
||||||
request_method='POST')
|
request_method='POST')
|
||||||
config.add_view(cls, attr='profile_add_note', route_name='{}.profile_add_note'.format(route_prefix),
|
config.add_view(cls, attr='profile_add_note', route_name='{}.profile_add_note'.format(route_prefix),
|
||||||
permission='{}.profile_add_note'.format(permission_prefix))
|
permission='people_profile.add_note')
|
||||||
|
|
||||||
# edit note
|
# edit note
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.profile_edit_note'.format(permission_prefix),
|
config.add_tailbone_permission('people_profile', 'people_profile.edit_note',
|
||||||
"Edit existing {} note from profile view".format(model_title))
|
"Edit {} Note records".format(model_title))
|
||||||
config.add_route('{}.profile_edit_note'.format(route_prefix), '{}/{{{}}}/profile/edit-note'.format(url_prefix, model_key),
|
config.add_route('{}.profile_edit_note'.format(route_prefix), '{}/{{{}}}/profile/edit-note'.format(url_prefix, model_key),
|
||||||
request_method='POST')
|
request_method='POST')
|
||||||
config.add_view(cls, attr='profile_edit_note', route_name='{}.profile_edit_note'.format(route_prefix),
|
config.add_view(cls, attr='profile_edit_note', route_name='{}.profile_edit_note'.format(route_prefix),
|
||||||
permission='{}.profile_edit_note'.format(permission_prefix))
|
permission='people_profile.edit_note')
|
||||||
|
|
||||||
# delete note
|
# delete note
|
||||||
config.add_tailbone_permission(permission_prefix, '{}.profile_delete_note'.format(permission_prefix),
|
config.add_tailbone_permission('people_profile', 'people_profile.delete_note',
|
||||||
"Delete existing {} note from profile view".format(model_title))
|
"Delete {} Note records".format(model_title))
|
||||||
config.add_route('{}.profile_delete_note'.format(route_prefix), '{}/{{{}}}/profile/delete-note'.format(url_prefix, model_key),
|
config.add_route('{}.profile_delete_note'.format(route_prefix), '{}/{{{}}}/profile/delete-note'.format(url_prefix, model_key),
|
||||||
request_method='POST')
|
request_method='POST')
|
||||||
config.add_view(cls, attr='profile_delete_note', route_name='{}.profile_delete_note'.format(route_prefix),
|
config.add_view(cls, attr='profile_delete_note', route_name='{}.profile_delete_note'.format(route_prefix),
|
||||||
permission='{}.profile_delete_note'.format(permission_prefix))
|
permission='people_profile.delete_note')
|
||||||
|
|
||||||
# make user for person
|
# make user for person
|
||||||
config.add_route('{}.make_user'.format(route_prefix), '{}/make-user'.format(url_prefix),
|
config.add_route('{}.make_user'.format(route_prefix), '{}/make-user'.format(url_prefix),
|
||||||
|
|
Loading…
Reference in a new issue