Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
view-permission-based-on-project-membership
Note that users now have two collections of projects: `projects` are the projects that users own, and `joined_projects` are the projects they have joined as members. We can now define view permission on projects, stories and tasks according to project membership. SHOW_PATCH
- Loading branch information
1 parent
957e199
commit 5de4365
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ def destroy_permitted? | |
end | ||
|
||
def view_permitted?(field) | ||
true | ||
project.viewable_by?(acting_user) | ||
end | ||
|
||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ def destroy_permitted? | |
end | ||
|
||
def view_permitted?(field) | ||
true | ||
story.viewable_by?(acting_user) | ||
end | ||
|
||
end |