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

[ENG-6849][ENG-6865] Update project overview files widget; auto close window upon oauth completion #10898

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion website/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def oauth_callback(service_name, auth):
_forward_to_addon_service('oauth1')
elif provider._oauth_version == 2:
_forward_to_addon_service('oauth2')
return {}
return {'enable_gv': True}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return the actual value of the waffle flag?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could, but on line 52 it is already checking if the flag is active, so at this point the waffle flag value would always be True.


user = auth.user

Expand Down
15 changes: 12 additions & 3 deletions website/templates/project/project.mako
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,17 @@
${ render_addon_widget.render_addon_widget('wiki', addons_widget_data['wiki']) }
%endif

%if not enable_gv:
<!-- Files -->
<!-- Files -->
% if enable_gv:
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">Files</h3>
</div>
<div class="panel-body">
<p> <em> Files can now be accessed and managed under the Files tab. </em> </p>
</div><!-- end .panel-body -->
</div>
% else:
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">Files</h3>
Expand Down Expand Up @@ -611,7 +620,7 @@
</div>
</div><!-- end .panel-body -->
</div>
%endif
% endif

% if addons:
<!-- Show widgets in left column if present -->
Expand Down
2 changes: 2 additions & 0 deletions website/templates/util/oauth_complete.mako
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
<html>
<head lang="en">
<script>
% if not enable_gv:
opener.oauthComplete(true);
% endif
window.close();
</script>
<meta charset="UTF-8">
Expand Down
Loading