summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Project tools visibility levelissue_19734Felipe Artur2016-08-3160-143/+708
|
* 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
| * | | Fix bug where pagination is still displayed despite all todos marked as doneClement Ho2016-08-315-2/+18
| | |/ | |/|
* | | Merge branch 'improve-application_spec' into 'master' Fatih Acet2016-08-311-3/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for existance of elements under test in application_spec.js ## What does this MR do? Checks that the elements under test in `application_spec.js` actually exist. ## Why was this MR needed? ``` $ echo 'just garbage' > spec/javascripts/fixtures/application.html.haml $ bundle exec teaspoon spec/javascripts/application_spec.js 2 examples, 0 failures ``` See merge request !6051
| * | | Check for existence of elements under test in application_spec.js (!6051)winniehell2016-08-261-3/+7
| | | |
* | | | Merge branch 'label-dropdown-encode' into 'master' Fatih Acet2016-08-314-3/+13
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed escaping issue with labels filter ## What does this MR do? Encodes label names to stop any JS errors. ## What are the relevant issue numbers? Closes #15552 See merge request !6123
| * | | Fixed escaping issue with labels filterlabel-dropdown-encodePhil Hughes2016-08-314-3/+13
| | | | | | | | | | | | | | | | Closes #15552
* | | | Merge branch 'remove-redundant-js-timeago-pending' into 'master' Fatih Acet2016-08-313-2/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant js-timeago-pending from user activity log ## What does this MR do? Enables the `skip_js` feature of `time_ago_with_tooltip()` since the frontend was already re-initializing `timeago` on all the elements after it received the data from the backend. ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? * Reduces bandwidth usage (Reduced by ~3.1kb) * Removes redundant code * Happy DOM :balloon: ## What are the relevant issue numbers? Closes #21063 ## Screenshots (if relevant) Before (DOM): ![Screen_Shot_2016-08-18_at_11.14.18_AM](/uploads/8be02cff27e452670988db8ff54bd57c/Screen_Shot_2016-08-18_at_11.14.18_AM.png) After (DOM): ![Screen_Shot_2016-08-18_at_11.26.51_AM](/uploads/a0c5cbcd4c7b8e524a848b50dbd88c55/Screen_Shot_2016-08-18_at_11.26.51_AM.png) Before (Bandwidth): ![Screen_Shot_2016-08-18_at_11.28.24_AM](/uploads/c37de0b398d7c66770f1def1777ca11a/Screen_Shot_2016-08-18_at_11.28.24_AM.png) After (Bandwidth): ![Screen_Shot_2016-08-18_at_11.29.49_AM](/uploads/dc21719b965df1e73c868470447a1b20/Screen_Shot_2016-08-18_at_11.29.49_AM.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [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) See merge request !5871