diff --git a/tailbone/templates/units-of-measure/index.mako b/tailbone/templates/units-of-measure/index.mako index b29bad66..fb3a3219 100644 --- a/tailbone/templates/units-of-measure/index.mako +++ b/tailbone/templates/units-of-measure/index.mako @@ -4,6 +4,7 @@ <%def name="grid_tools()"> ${parent.grid_tools()} + % if master.has_perm('collect_wild_uoms'): + % endif <%def name="modify_this_page_vars()"> ${parent.modify_this_page_vars()} + % if master.has_perm('collect_wild_uoms'): + % endif diff --git a/tailbone/views/uoms.py b/tailbone/views/uoms.py index 11f80779..964401f1 100644 --- a/tailbone/views/uoms.py +++ b/tailbone/views/uoms.py @@ -112,6 +112,10 @@ class UnitOfMeasureView(MasterView): route_prefix = cls.get_route_prefix() url_prefix = cls.get_url_prefix() permission_prefix = cls.get_permission_prefix() + model_title_plural = cls.get_model_title_plural() + + # fix perm group name + config.add_tailbone_permission_group(permission_prefix, model_title_plural, overwrite=False) # collect wild uoms config.add_tailbone_permission(permission_prefix, '{}.collect_wild_uoms'.format(permission_prefix),