Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limit visibiltiy of orgs to admin #5374

Merged
merged 1 commit into from
Oct 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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