summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Optimize branch lookups and force a repository reload for Repository#find_branchsh-reload-find-branchStan Hu2016-09-015-5/+39
| | | | | | | | | | | | | If `git gc` runs and `Repository` has an instance to `Rugged::Repository`, a bug in libgit2 may cause the instance to return a stale value or a missing branch. This change not only optimizes the branch lookup so we don't have to iterate through every branch, but it also works around the `git gc` issue by forcing a repository reload every time `Repository#find_branch` is called. See: https://github.com/libgit2/libgit2/issues/1534 Closes #15392, #21470
* Merge branch 'control-dropdown-permissions' into 'master' Robert Speicher2016-08-312-18/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Hide group control nav if no options present ## What does this MR do? Hides the group nav controls if no options present in the dropdown. Also fixed the alignment of the dropdown to match the project page. ## What are the relevant issue numbers? Closes #19120 See merge request !5155
| * Updated variable namecontrol-dropdown-permissionsPhil Hughes2016-08-301-3/+3
| |
| * Hide group control nav if no options presentPhil Hughes2016-08-302-18/+22
| | | | | | | | Closes #19120
* | Merge branch ↵Robert Speicher2016-08-313-15/+42
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'gh-importer-use-default-project-visibility-for-non-private-projects' into 'master' GitHub importer use default project visibility for non-private projects ## What does this MR do? GitHub importer use the `Default Project Visibility` setting for all non-private projects. ## Why was this MR needed? This allow users to import projects when `Public` visibility is restricted. ## What are the relevant issue numbers? Fixes #21437 See merge request !6023
| * | Update CHANGELOGDouglas Barbosa Alexandre2016-08-311-0/+1
| | |
| * | GitHub importer use default project visibility for non-private projectsDouglas Barbosa Alexandre2016-08-312-15/+41
|/ /
* | Merge branch 'refactor/add-policies' into 'master' Robert Speicher2016-08-3145-824/+690
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor ability.rb into Policies ## What does this MR do? Factors out `ability.rb` into a new abstraction - the "policy" (stored in `app/policies`). A policy is a class named `#{class_name}Policy` (looked up automatically as needed) that implements `rules` as follows: ``` ruby class ThingPolicy < BasePolicy def rules @user # this is a user to determine abilities for, optionally nil in the anonymous case @subject # this is the subject of the ability, guaranteed to be an instance of `Thing` can! :some_ability # grant the :some_ability permission cannot! :some_ability # ensure that :some_ability is not allowed. this overrides any `can!` that is called before or after delegate! @subject.other_thing # merge the abilities (can!) and prohibitions (cannot!) from `@subject.other_thing` can? :some_ability # test whether, so far, :some_ability is allowed end def anonymous_rules # optional. if not implemented `rules` is called where `@user` is nil. otherwise this method is called when `@user` is nil. end end ``` See merge request !5796
| * | newline before default returnrefactor/add-policieshttp://jneen.net/2016-08-301-0/+1
| | |
| * | s/NB:/NOTE:/http://jneen.net/2016-08-302-2/+2
| | |
| * | don't use a deprecated api in ability_spechttp://jneen.net/2016-08-301-2/+2
| | |
| * | implement RuleSet#size for testshttp://jneen.net/2016-08-301-0/+4
| | |
| * | line break after guard clausehttp://jneen.net/2016-08-301-0/+1
| | |
| * | use || in place of `or`http://jneen.net/2016-08-301-1/+1
| | |
| * | use a more compact style for access policieshttp://jneen.net/2016-08-301-11/+4
| | |
| * | move the rules method to the top #cosmetichttp://jneen.net/2016-08-301-27/+27
| | |
| * | factor out a RuleSet so that `delegate!` retains @cannothttp://jneen.net/2016-08-302-9/+51
| | |
| * | remove the rest of the dead codehttp://jneen.net/2016-08-301-74/+0
| | |
| * | special-case blocked usershttp://jneen.net/2016-08-301-0/+1
| | |
| * | test if we can :read_group the group, not the namespacehttp://jneen.net/2016-08-301-1/+1
| | |
| * | use a nil subject when we want to check global abilitieshttp://jneen.net/2016-08-302-2/+2
| | |
| * | add Deployment, Environment, and ExternalIssue policieshttp://jneen.net/2016-08-303-0/+15
| | |
| * | take the dive - only use abilities from Policieshttp://jneen.net/2016-08-301-8/+1
| | |
| * | use the cached abilities in #delegate!http://jneen.net/2016-08-301-1/+1
| | |
| * | port UserPolicyhttp://jneen.net/2016-08-302-11/+11
| | |
| * | port runners, namespaces, group/project_membershttp://jneen.net/2016-08-304-58/+42
| | |
| * | add personal snippets and project membershttp://jneen.net/2016-08-302-0/+38
| | |
| * | factor in global permissionshttp://jneen.net/2016-08-302-2/+9
| | |
| * | trim more dead codehttp://jneen.net/2016-08-301-52/+1
| | |
| * | port groupshttp://jneen.net/2016-08-302-36/+48
| | |
| * | port personal snippetshttp://jneen.net/2016-08-301-32/+1
| | |
| * | trim dead codehttp://jneen.net/2016-08-301-81/+0
| | |
| * | port notes and project snippetshttp://jneen.net/2016-08-302-0/+39
| | |
| * | add automatic detection of the policy classhttp://jneen.net/2016-08-302-16/+18
| | |
| * | port CommitStatus/Buildhttp://jneen.net/2016-08-304-1/+24
| | |
| * | add and use MergeRequestPolicyhttp://jneen.net/2016-08-302-2/+8
| | |
| * | port issues to Issu{able,e}Policyhttp://jneen.net/2016-08-305-4/+58
| | |
| * | add support for anonymous abilitieshttp://jneen.net/2016-08-303-205/+67
| | |
| * | add project_policy_spec to replace .project_abilities spechttp://jneen.net/2016-08-302-64/+36
| | |
| * | add policies, and factor out ProjectPolicyhttp://jneen.net/2016-08-303-31/+231
| | |
| * | remove Ability.abilitieshttp://jneen.net/2016-08-3018-61/+37
| | |
| * | 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-306-20/+22
| | |
| * | delete project_security_spechttp://jneen.net/2016-08-301-112/+0
| | | | | | | | | | | | | | | re a conversation with @rspeicher, this spec isn't really testing anything.
| * | re-enable the cyclomatic complexity checkerhttp://jneen.net/2016-08-301-1/+0
| | |
* | | Merge branch 'rs-broadcast-message-api' into 'master' Robert Speicher2016-08-316-0/+444
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add a BroadcastMessage API Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/21628 See merge request !6112
| * | | Add BroadcastMessage API documentationRobert Speicher2016-08-311-0/+158
| | | |
| * | | Add BroadcastMessage API implementationRobert Speicher2016-08-315-0/+286
| | | |
* | | | Merge branch 'fix-todo-pagination' into 'master' Fatih Acet2016-08-315-2/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug where pagination is still displayed despite all todos marked as done ## What does this MR do? Changes the todo `mark all as done` button callback to remove pagination and add user friendly text `"You're all done!"` so that it is consistent with what the page should look like after refreshing ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? Resolve existing UI inconsistency ## Screenshots (if relevant) Before: ![8xDRiXB1TL](/uploads/479edbdedf8d468b4c5e502f36a0c19f/8xDRiXB1TL.gif) After: ![q4XDxhujPX](/uploads/3566eb538e6ad5a2d32b78351b9bc47d/q4XDxhujPX.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21048 See merge request !6113