Created
April 12, 2014 14:11
-
-
Save svisamsetty/10537566 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TaskPolicy < Struct.new(:user, :task) | |
class Scope < Struct.new(:user, :scope) | |
def resolve | |
if user.admin? | |
scope.all | |
else | |
#scope.workpackage.projec | |
end | |
end | |
end | |
def update? | |
user.admin? or not post.published? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment