Commit 51277a21 authored by maeda's avatar maeda

Add assignable, issues_visibility, time_entries_visibility and...

Add assignable, issues_visibility, time_entries_visibility and users_visibility to Roles API response (#28191).

Patch by Alex Stanev.


git-svn-id: https://svn.redmine.org/redmine/trunk@17498 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 59b520d2
api.role do
api.id @role.id
api.name @role.name
api.assignable @role.assignable
api.issues_visibility @role.issues_visibility
api.time_entries_visibility @role.time_entries_visibility
api.users_visibility @role.users_visibility
api.array :permissions do
@role.permissions.each do |perm|
api.permission(perm.to_s)
......
......@@ -53,6 +53,11 @@ class Redmine::ApiTest::RolesTest < Redmine::ApiTest::Base
assert_select 'role' do
assert_select 'name', :text => 'Manager'
assert_select 'assignable', :text => 'true'
assert_select 'issues_visibility', :text => 'all'
assert_select 'time_entries_visibility', :text => 'all'
assert_select 'users_visibility', :text => 'all'
assert_select 'role permissions[type=array]' do
assert_select 'permission', Role.find(1).permissions.size
assert_select 'permission', :text => 'view_issues'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment