diff --git a/src/wuttaweb/templates/base.mako b/src/wuttaweb/templates/base.mako index ce5e4ca..ffe903c 100644 --- a/src/wuttaweb/templates/base.mako +++ b/src/wuttaweb/templates/base.mako @@ -482,36 +482,44 @@ <%def name="render_crud_header_buttons()"> % if master: % if master.viewing: - - % if instance_deletable: - - % endif - % elif master.editing: - - % if instance_deletable: - - % endif - % elif master.deleting: - - + % if instance_editable and master.has_perm('edit'): + + % endif + % if instance_deletable and master.has_perm('delete'): + + % endif + % elif master.editing: + % if instance_viewable and master.has_perm('view'): + + % endif + % if instance_deletable and master.has_perm('delete'): + + % endif + % elif master.deleting: + % if instance_viewable and master.has_perm('view'): + + % endif + % if instance_editable and master.has_perm('edit'): + + % endif % endif % endif