Skip to content

Commit

Permalink
limit visibiltiy of orgs to admin (#5374)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored and danlipert committed Oct 24, 2019
1 parent 90ece74 commit 0bdf8ef
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app/marketing/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@


def get_settings_navs(request):
return [{
tabs = [{
'body': _('Email'),
'href': reverse('email_settings', args=('', ))
}, {
Expand Down Expand Up @@ -85,11 +85,16 @@ def get_settings_navs(request):
}, {
'body': _('Job Status'),
'href': reverse('job_settings'),
}, {
'body': _('Organizations'),
'href': reverse('org_settings'),
}]

if request.user.is_staff:
tabs.append({
'body': _('Organizations'),
'href': reverse('org_settings'),
})

return tabs


def settings_helper_get_auth(request, key=None):
# setup
Expand Down Expand Up @@ -668,6 +673,7 @@ def job_settings(request):
return TemplateResponse(request, 'settings/job.html', context)


@staff_member_required
def org_settings(request):
"""Display and save user's Account settings.
Expand Down

0 comments on commit 0bdf8ef

Please sign in to comment.