Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Prevent error when authorizing an admin-created OAauth application wi…
Browse files Browse the repository at this point in the history
…thout a set owner
  • Loading branch information
DouweM authored and Winnie Hellmann committed Nov 13, 2017
1 parent 3df677a commit 644fe00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/views/doorkeeper/authorizations/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
- auth_app_owner = @pre_auth.client.application.owner

%main{ :role => "main" }
.modal-no-backdrop.modal-doorkeepr-auth
.modal-content
Expand All @@ -20,9 +18,14 @@
%p
An application called
= link_to @pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer'
is requesting access to your GitLab account. This application was created by
= succeed "." do
= link_to auth_app_owner.name, user_path(auth_app_owner)
is requesting access to your GitLab account.

- auth_app_owner = @pre_auth.client.application.owner
- if auth_app_owner
This application was created by
= succeed "." do
= link_to auth_app_owner.name, user_path(auth_app_owner)

Please note that this application is not provided by GitLab and you should verify its authenticity before
allowing access.
- if @pre_auth.scopes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Prevent error when authorizing an admin-created OAauth application without
a set owner
merge_request:
author:
type: fixed

0 comments on commit 644fe00

Please sign in to comment.