summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
Commit message (Collapse)AuthorAgeFilesLines
* Backport of 4084-epics-username-autocompleteMario de la Ossa2018-05-041-0/+8
|
* Remove edit_note and update_note abilities in favor of admin_noteDouwe Maan2018-04-101-4/+0
|
* Port `read_cross_project` ability from EEBob Van Landuyt2018-02-221-1/+29
|
* bugfix: use `require_dependency` to bring in DeclarativePolicybugfix/declarative-policy-reloadinghttp://jneen.net/2017-06-291-1/+1
|
* convert the special-case Ability methods to use policieshttp://jneen.net/2017-06-271-34/+10
|
* convert all the policies to DeclarativePolicyhttp://jneen.net/2017-06-271-14/+16
|
* use a magic default :global symbol instead of nilhttp://jneen.net/2017-03-091-3/+4
| | | | to make sure we mean the global permissions
* address commentsJarka Kadlecova2017-01-251-1/+1
|
* Support notes without projectJarka Kadlecova2017-01-181-0/+11
|
* factor out a RuleSet so that `delegate!` retains @cannothttp://jneen.net/2016-08-301-1/+1
|
* remove the rest of the dead codehttp://jneen.net/2016-08-301-74/+0
|
* take the dive - only use abilities from Policieshttp://jneen.net/2016-08-301-8/+1
|
* port UserPolicyhttp://jneen.net/2016-08-301-11/+0
|
* port runners, namespaces, group/project_membershttp://jneen.net/2016-08-301-58/+0
|
* trim more dead codehttp://jneen.net/2016-08-301-52/+1
|
* port groupshttp://jneen.net/2016-08-301-36/+3
|
* port personal snippetshttp://jneen.net/2016-08-301-32/+1
|
* trim dead codehttp://jneen.net/2016-08-301-81/+0
|
* add automatic detection of the policy classhttp://jneen.net/2016-08-301-15/+3
|
* port CommitStatus/Buildhttp://jneen.net/2016-08-301-1/+2
|
* add and use MergeRequestPolicyhttp://jneen.net/2016-08-301-2/+5
|
* port issues to Issu{able,e}Policyhttp://jneen.net/2016-08-301-2/+4
|
* add support for anonymous abilitieshttp://jneen.net/2016-08-301-188/+6
|
* add policies, and factor out ProjectPolicyhttp://jneen.net/2016-08-301-31/+4
|
* remove Ability.abilitieshttp://jneen.net/2016-08-301-5/+0
|
* make almost everything on Ability privatehttp://jneen.net/2016-08-301-46/+44
|
* don't double-cache project_abiliteshttp://jneen.net/2016-08-301-11/+2
|
* remove six, and use a Set insteadhttp://jneen.net/2016-08-301-6/+19
|
* re-enable the cyclomatic complexity checkerhttp://jneen.net/2016-08-301-1/+0
|
* Fix "Wiki" link not appearing in navigation for projects with external wiki21446-service-external-wiki-only-works-when-project-wiki-is-enabledAlejandro Rodríguez2016-08-261-1/+1
|
* Make Ability#project_abilities return unique values and fix countsfix-rspec-failures-due-to-cached-permissionsStan Hu2016-08-201-1/+1
|
* Fix assorted rspec failures due to stale, cached user permissionsStan Hu2016-08-201-21/+27
| | | | | | | RequestStore is disabled in tests, but the Ability class was caching user permissions based on the user and project ID of previous test runs. Revise code to use RequestStore only if it is active.
* Merge branch 'master' into diff-line-comment-vuejsConnor Shea2016-08-171-0/+5
|\
| * Move action to render board lists to `Projects::Boards::ListsController`Douglas Barbosa Alexandre2016-08-171-0/+2
| |
| * Turn board for public projects accessible to everyoneDouglas Barbosa Alexandre2016-08-171-0/+1
| |
| * Add authorization to issues board related controllersDouglas Barbosa Alexandre2016-08-171-0/+2
| |
* | Merge branch 'master' into diff-line-comment-vuejsDouwe Maan2016-08-121-0/+4
|\ \ | |/
| * Move abilities by subject class to a dedicated method20621-avoid-lame-conflicts-in-ability-allowedRémy Coutable2016-08-041-0/+4
| | | | | | | | | | | | This will avoid lame conflicts when merging CE to EE Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'master' into diff-line-comment-vuejsDouwe Maan2016-08-031-0/+10
|\ \ | |/ | | | | | | | | # Conflicts: # app/models/discussion.rb # db/schema.rb
| * Method for returning issues readable by a userability-batch-issue-checkingYorick Peterse2016-07-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The method Ability.issues_readable_by_user takes a list of users and an optional user and returns an Array of issues readable by said user. This method in turn is used by Banzai::ReferenceParser::IssueParser#nodes_visible_to_user so this method no longer needs to get all the available abilities just to check if a user has the "read_issue" ability. To test this I benchmarked an issue with 222 comments on my development environment. Using these changes the time spent in nodes_visible_to_user was reduced from around 120 ms to around 40 ms.
* | Merge branch 'master' into diff-line-comment-vuejsDouwe Maan2016-07-281-0/+12
|\ \ | |/ | | | | | | # Conflicts: # db/schema.rb
| * Incorporate review commentsStan Hu2016-07-261-4/+2
| |
| * Optimize maximum user access level lookup in loading of notesStan Hu2016-07-261-0/+14
| | | | | | | | | | | | | | | | NotesHelper#note_editable? and ProjectTeam#human_max_access currently take about 16% of the load time of an issue page. This MR preloads the maximum access level of users for all notes in issues and merge requests with several queries instead of one per user and caches the result in RequestStore.
* | Add access checks for diff note and discussion resolutionDouwe Maan2016-07-251-1/+7
|/
* Fix a few nitpicksRémy Coutable2016-07-201-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow to disable user request access to groups/projectsFelipe Artur2016-07-201-2/+2
|
* Allow to access Container Registry for Public and Internal projectsallow-to-pull-public-imagesKamil Trzcinski2016-07-151-1/+2
|
* Add a migration to remove requesters that are owners of their project18790-dont-show-request-button-to-project-ownerRémy Coutable2016-07-051-10/+12
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix condition in Ability and start with cheaper checksRémy Coutable2016-07-051-7/+7
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* New :request_access ability to replace a ugly helperRémy Coutable2016-07-051-6/+24
| | | | | | | | | | | - Group / project members cannot request access - Group members cannot request access to a group's project This addresses an issue where project owners could request access to their own project, leading to UI inconsistency where their requester status would replace their owner status. Signed-off-by: Rémy Coutable <remy@rymai.me>