Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Implemented standalone Settings page #191

Merged
merged 3 commits into from
Apr 20, 2017
Merged

Implemented standalone Settings page #191

merged 3 commits into from
Apr 20, 2017

Conversation

roll
Copy link
Member

@roll roll commented Apr 20, 2017

@roll roll requested a review from amercader April 20, 2017 10:13
@roll roll changed the base branch from master to source-page April 20, 2017 10:14
@roll
Copy link
Member Author

roll commented Apr 20, 2017

@amercader
I had a real strange bug on clicking remove s3 bucket (my user session breaks) - could you check?

@amercader
Copy link
Member

@roll maybe this:

diff --git a/goodtablesio/utils/frontend.py b/goodtablesio/utils/frontend.py
index 20d2987..c5c3366 100644
--- a/goodtablesio/utils/frontend.py
+++ b/goodtablesio/utils/frontend.py
@@ -22,7 +22,7 @@ def render_component(component, props={}):
         filename = 'index.html'
 
     # Common props
-    if not props or (props and 'userName' not in props):
+    if not props or props == {} or (props and 'userName' not in props):
         props['userName'] = getattr(current_user, 'display_name', None)
 
     return render_template(filename, component=component, props=props.copy())

It worked fine for me after it

@amercader
Copy link
Member

you are right, something is wrong with sessions. When I tried to go to the dashboard I was logged out. I'll investigate a bit more.

@@ -64,6 +64,11 @@ def source_s3_job(bucket, job):
return _source('s3', bucket, job)


@site.route('/settings')
def settings():
Copy link
Member

Choose a reason for hiding this comment

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

You'll need @login_required here (just noticed as I'm working on access checks)

@roll roll merged commit 62c9533 into source-page Apr 20, 2017
@roll roll deleted the settings-page branch April 20, 2017 12:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants