Only expose "Make User" button when viewing a person

i.e. don't expose when editing the person
This commit is contained in:
Lance Edgar 2019-06-18 16:54:05 -05:00
parent a99b8c6aaf
commit 975aa0a3cc

View file

@ -214,7 +214,7 @@ class PeopleView(MasterView):
items.append(HTML.tag('li', c=[tags.link_to(text, url)]))
if items:
return HTML.tag('ul', c=items)
elif self.request.has_perm('users.create'):
elif self.viewing and self.request.has_perm('users.create'):
if use_buefy:
return HTML.tag('button', type='button', class_='button is-primary',
id='make-user', c="Make User")