Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

[1391] Refactor ability.rb #1402

Merged
merged 1 commit into from
Jan 7, 2016
Merged

[1391] Refactor ability.rb #1402

merged 1 commit into from
Jan 7, 2016

Conversation

squidgetx
Copy link
Contributor

From #1391

@squidgetx
Copy link
Contributor Author

yay

can :create, User
def initialize(user)
@user = user
if user.nil?
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't strictly correct, I don't think. If I'm remembering correctly from #2, we implement guest users with an actual instance of the User class that has a view_mode of guest. If user.nil?, then all that they can do is can :create, User so that unregistered users with CAS can create their accounts on first login (I think). Can you double-check and make sure that this makes sense? NVM, I see how we had some overlap with our definitions before so this solution should work fine, nicely done!

@orenyk
Copy link
Contributor

orenyk commented Jan 4, 2016

This looks good to me, nicely done. Squash and update the commit message to match the specs in the CONTRIBUTING guide and we should be good to go!

@orenyk orenyk force-pushed the 1391_refactor_ability branch from dec128b to 5b84979 Compare January 7, 2016 17:03
orenyk added a commit that referenced this pull request Jan 7, 2016
@orenyk orenyk merged commit 121d025 into master Jan 7, 2016
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