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

Access update #100

Closed
wants to merge 6 commits into from
Closed

Access update #100

wants to merge 6 commits into from

Conversation

Rishi860
Copy link
Collaborator

No description provided.

Comment on lines 89 to 92
const confirmation = confirm(
`Are you sure you want to change your access level to a ${oppositeRole}?`
);
if(!confirmation) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is good!
But it will give a very generic prompt, could you do something that warns the admin if she is trying to downgrade herself

Copy link
Collaborator

@Devanshu24 Devanshu24 left a comment

Choose a reason for hiding this comment

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

Also if possible could you make a separate PR for the Google Analytics addition
I'll be bit easier that way

Comment on lines 78 to 83
computed: {
...getters,
adminInfo(){
return this.user
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks a little cryptic
I'd say just do ...getters in the methods and use the user() method

The current one is giving me an error adminInfo is not defined

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ya exactly i tried that, but the problem I got when using ...getters in the methods was, the keyword user whenever used afterwards then address user from the ...getters so I thought using it in computed and then calling a function might work.
So should I change the user variable name in the template for it to work?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok I beleive the error simply is that user is not a variable it is a method user() try replacing it and see if it works

I haven't tried it

@Rishi860
Copy link
Collaborator Author

Ok I will make a new PR for Google Analytics.

@Rishi860 Rishi860 changed the title Google Analytics and access update Access update Aug 18, 2020
@Devanshu24 Devanshu24 linked an issue Aug 21, 2020 that may be closed by this pull request
@Rishi860 Rishi860 closed this Sep 3, 2020
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.

Do not let an Admin downgrade themselves
3 participants