Commit graph

26 commits

Author SHA1 Message Date
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Phil Hughes
285049b91b spec updates 2017-05-31 15:34:02 +01:00
Valery Sizov
387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Valery Sizov
800f2a722f [Issue board sorting] Specs 2017-02-28 16:52:49 +02:00
Douwe Maan
ad640bc5f9 Use Namespace#full_path instead of #path where appropriate 2017-02-23 17:55:01 -06:00
Douglas Barbosa Alexandre
274987d5c0 Reuse endpoint to list issues for a list instead of create a new one 2017-02-03 17:02:44 +03:00
Douglas Barbosa Alexandre
79a132a38d Fix spec for Projects::Boards::ListsController 2017-02-03 17:02:43 +03:00
Douglas Barbosa Alexandre
0c052f116c Remove default value for project argument on subscribable concern 2016-11-17 15:10:13 -02:00
Phil Hughes
f1350a5c82 Merge branch 'master' into issue-board-sidebar 2016-10-19 08:44:55 +01:00
Douglas Barbosa Alexandre
1a2002d908 Update board specs to use board factory instead of project_with_board 2016-10-11 11:39:05 -03:00
Douglas Barbosa Alexandre
2c2a1dea67 Refactoring service to create a new issue in a board list 2016-10-11 11:39:05 -03:00
Douglas Barbosa Alexandre
38cece4957 Fix rubocop offenses 2016-10-11 11:39:05 -03:00
Douglas Barbosa Alexandre
6751509865 Update endpoints to handle with board issues 2016-10-11 11:39:05 -03:00
Douglas Barbosa Alexandre
e1f889df64 Update endpoints to handle with board list changes 2016-10-11 11:39:05 -03:00
Phil Hughes
7d20a91b2e Restore subscribe status in JSON 2016-10-07 09:24:57 +01:00
Douglas Barbosa Alexandre
0c286d5473 Fix JSON Schema that validates data returned by board issues endpoint 2016-10-07 09:15:46 +01:00
Douglas Barbosa Alexandre
fe3f1657ab Add tests to Projects::Boards::IssuesController#create action 2016-10-06 11:00:01 +01:00
Douglas Barbosa Alexandre
97551e8dd9 Improve project_with_board factory to create the default lists 2016-09-26 14:42:38 -03:00
Robert Speicher
e71cd7a300 Merge branch 'refactor/add-policies' into 'master'
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
2016-08-31 20:53:40 +00:00
http://jneen.net/
5853c96b49 remove Ability.abilities 2016-08-30 11:35:06 -07:00
Douglas Barbosa Alexandre
4cccfc0f17 Fix issue boards leak private label names and descriptions 2016-08-29 16:04:28 -03:00
Douglas Barbosa Alexandre
536bdf643e Move the set up of the state described in context to a before block 2016-08-17 12:59:00 -03:00
Douglas Barbosa Alexandre
84afd6254a Remove # from controller actions specs 2016-08-17 12:58:59 -03:00
Douglas Barbosa Alexandre
29a91c5bc6 Fix matcher match_response_schema 2016-08-17 12:58:59 -03:00
Douglas Barbosa Alexandre
cd98ff179c Move action to render board lists to Projects::Boards::ListsController 2016-08-17 12:58:59 -03:00
Douglas Barbosa Alexandre
57737785df Move board related controllers to the Boards namespace 2016-08-17 12:58:59 -03:00