Last active
December 15, 2015 22:28
-
-
Save dcramer/5332735 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def missing_access(request, perm_name, *args): | |
| resp = plugins.first('missing_access_response', request, perm_name, *args) | |
| if resp: | |
| return resp | |
| return HttpResponseRedirect(reverse('sentry')) | |
| @csrf_protect | |
| @has_access(MEMBER_OWNER) | |
| def create_new_team_project(request, team): | |
| from sentry.web.forms.projects import NewProjectAdminForm, NewProjectForm | |
| if not can_create_projects(request.user, team): | |
| return missing_access(request, 'add_project', team) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment