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

Add is admin to koala events #821

Merged
merged 6 commits into from
Aug 29, 2019
Merged

Add is admin to koala events #821

merged 6 commits into from
Aug 29, 2019

Conversation

Scollaco
Copy link
Contributor

@Scollaco Scollaco commented Aug 28, 2019

πŸ“² What

  • Adds the isAdmin property on the User model
  • Appends the property user_is_admin to the Koala defaultsProperties.

πŸ€” Why

  • This makes easier to filter out admins users on looker.

πŸ›  How

  • The User model now receives the Boolean is_admin.
  • Updating UserLenses and UserTemplate
  • Adding the property user_is_admin on defaultsProperties of Koala.
  • Fixing and adding tests for the new property

βœ… Acceptance criteria

In order to test this, you should setup a proxy in order to see the requests and wait until the koala events are sent. The koala urls (based on the environment) are stored in Secrets.swift.

Once the you see the request, notice that the url has the format native/track?data=BASE64_STRING. You will have to copy the whole string after data= and decode using an online base64 decoder.

  • Logout user should not see the is_admin property (This property is not sent to logged out users).
  • Logged in users with an admin account should see user_is_admin:true
  • Logged in users with no admin account should see user_is_admin:false

Copy link
Contributor

@dusi dusi left a comment

Choose a reason for hiding this comment

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

Looks good...I think you must have opened the PR after Danger finished running because you'll notice that trying to merge master (to resolve the branch being out of sync) SwiftFormat will actually complain about UserLenses.swift not being formatted properly so if you can do the 2 following things I'm happy to sign off

  1. Merge master
  2. Format code

Copy link
Contributor

@dusi dusi left a comment

Choose a reason for hiding this comment

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

🚒 🚒 🚒
🚒 🚒 🚒
🚒 🚒 🚒

@Scollaco Scollaco merged commit 3d71808 into master Aug 29, 2019
@Scollaco Scollaco deleted the add-isAdmin-to-koala-events branch August 29, 2019 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants