summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorStephen Lottermoser <slottermoser@apple.com>2013-05-01 23:52:05 -0700
committerStephen Lottermoser <holdtotherod@gmail.com>2013-05-02 00:06:59 -0700
commit4c44c5ef9a569c65bca8e70078205ef2ce7d6396 (patch)
tree5b10cfdeb170a71744113b1022c63b6ac08bb11e /app/models/ability.rb
parent4f5aae1d26ac66f8baf0574a2e457597a3e7cc33 (diff)
downloadgitlab-ce-4c44c5ef9a569c65bca8e70078205ef2ce7d6396.tar.gz
Internally public projects
Public projects listed in the public section will be linked to the actual project's page. Public projects now give any user Guest permissions to the project, allowing them to download the code, read and create issues, and view anything else in the project's pages. Ample access tests have been added to the project_access_spec to verify correct permissions and behavior on public projects. - Visitors to the site who are not logged in still cannot view the project's pages. - Logged-in users visiting a public project where they are not a team member can create issues, but not snippets. They can view the projects code, issues, merge requests, etc, just as if they were a Guest member of the project. - Since this is a public project, the user is also granted :download_code permissions, a permission normally reserved for Reporters, since they can clone the repo anyways and browse commits and branches locally.
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 5b49104da8a..c5e4524b8ce 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -37,7 +37,7 @@ class Ability
elsif team.reporters.include?(user)
rules << project_report_rules
- elsif team.guests.include?(user)
+ elsif team.guests.include?(user) or project.public?
rules << project_guest_rules
end