Access Permissions
Personas in this Story: Default, SecondOwner, TechAdmin, MemberPlus, Member, Subcontractor, Client.
Response: HTTP 200, application/json (Hide)
POST /projects
Payload:
1 2 3
{ "name": "Only First Owner Invited" }
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
{ "single": { "id": 1, "class": "Project", "url_path": "\/projects\/1", "name": "Only First Owner Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-r9mS1mM@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
POST /projects
Payload:
1 2 3 4 5 6 7 8 9 10 11 12
{ "name": "Everyone Invited", "members": [ 1, 2, 3, 4, 5, 6, 7 ] }
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Access to projects in ActiveCollab is controlled by user's role and their involvment in a project:
- Users with role Owner can access all projects,
- Users with other roles can access only projects that they are invited to.
To demonstrate, we have created X accounts:
Response: HTTP 200, application/json (Hide)
GET /users
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
[ { "id": 1, "class": "Owner", "url_path": "\/users\/1", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163996, "created_by_id": 1, "updated_on": 1430163996, "updated_by_id": 1, "language_id": 0, "first_name": "Ilija.studen", "last_name": null, "display_name": "ilija.studen", "short_display_name": "ilija.studen", "email": "ilija.studen@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=1&size=--SIZE--×tamp=1430163996", "custom_permissions": [], "company_id": 1, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 2, "class": "Owner", "url_path": "\/users\/2", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163998, "created_by_id": 1, "updated_on": 1430163998, "updated_by_id": 1, "language_id": 0, "first_name": "Second-owner", "last_name": null, "display_name": "second-owner", "short_display_name": "second-owner", "email": "second-owner@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=2&size=--SIZE--×tamp=1430163998", "custom_permissions": [], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 3, "class": "Member", "url_path": "\/users\/3", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163998, "created_by_id": 1, "updated_on": 1430163998, "updated_by_id": 1, "language_id": 0, "first_name": "Tech_admin", "last_name": null, "display_name": "tech_admin", "short_display_name": "tech_admin", "email": "tech_admin@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=3&size=--SIZE--×tamp=1430163998", "custom_permissions": [ "can_manage_settings" ], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 4, "class": "Member", "url_path": "\/users\/4", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163999, "created_by_id": 1, "updated_on": 1430163999, "updated_by_id": 1, "language_id": 0, "first_name": "Member-plus", "last_name": null, "display_name": "member-plus", "short_display_name": "member-plus", "email": "member-plus@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=4&size=--SIZE--×tamp=1430163999", "custom_permissions": [ "can_manage_projects" ], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 5, "class": "Member", "url_path": "\/users\/5", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163999, "created_by_id": 1, "updated_on": 1430163999, "updated_by_id": 1, "language_id": 0, "first_name": "Member", "last_name": null, "display_name": "member", "short_display_name": "member", "email": "member@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=5&size=--SIZE--×tamp=1430163999", "custom_permissions": [], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 6, "class": "Subcontractor", "url_path": "\/users\/6", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430163999, "created_by_id": 1, "updated_on": 1430163999, "updated_by_id": 1, "language_id": 0, "first_name": "Subcontractor", "last_name": null, "display_name": "subcontractor", "short_display_name": "subcontractor", "email": "subcontractor@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=6&size=--SIZE--×tamp=1430163999", "custom_permissions": [], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null }, { "id": 7, "class": "Client", "url_path": "\/users\/7", "is_archived": false, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "language_id": 0, "first_name": "Client", "last_name": null, "display_name": "client", "short_display_name": "client", "email": "client@activecollab.com", "additional_email_addresses": [], "is_pending_activation": false, "avatar_url": "http:\/\/feather.dev\/proxy.php?proxy=avatar&module=system&v=current&b=DEV&user_id=7&size=--SIZE--×tamp=1430164000", "custom_permissions": [], "company_id": 0, "title": null, "phone": null, "im_type": null, "im_handle": null, "note": null } ]
and created two projects, one that only first owner is invited to and another one where everyone's invited to:
Response: HTTP 200, application/json (Hide)
GET /projects
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
[ { "id": 1, "class": "Project", "url_path": "\/projects\/1", "name": "Only First Owner Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-r9mS1mM@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 } ]
Access to the first project is granted only to users with Owner role:
Response: HTTP 200, application/json (Hide)
GET /projects/1
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
{ "single": { "id": 1, "class": "Project", "url_path": "\/projects\/1", "name": "Only First Owner Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-r9mS1mM@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/1 (as SecondOwner)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
{ "single": { "id": 1, "class": "Project", "url_path": "\/projects\/1", "name": "Only First Owner Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-r9mS1mM@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 403, text/html
GET /projects/1 (as TechAdmin)
Response: HTTP 403, text/html
GET /projects/1 (as MemberPlus)
Response: HTTP 403, text/html
GET /projects/1 (as Member)
Response: HTTP 403, text/html
GET /projects/1 (as Subcontractor)
Response: HTTP 403, text/html
GET /projects/1 (as Client)
Access to the second project is granted to everyone, because everyone's invited:
Response: HTTP 200, application/json (Hide)
GET /projects/2
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as SecondOwner)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as TechAdmin)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as MemberPlus)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as Member)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as Subcontractor)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }
Response: HTTP 200, application/json (Hide)
GET /projects/2 (as Client)
Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
{ "single": { "id": 2, "class": "Project", "url_path": "\/projects\/2", "name": "Everyone Invited", "completed_on": null, "completed_by_id": null, "is_completed": false, "members": [ 1, 2, 3, 4, 5, 6, 7 ], "category_id": 0, "label_id": 0, "is_trashed": false, "trashed_on": null, "trashed_by_id": 0, "created_on": 1430164000, "created_by_id": 1, "updated_on": 1430164000, "updated_by_id": 1, "body": null, "body_formatted": "", "company_id": 1, "leader_id": 0, "currency_id": 2, "template_id": 0, "based_on_type": null, "based_on_id": null, "email": "notifications+m2p-0jl3j5a@mail.manageprojects.com", "is_tracking_enabled": true, "is_client_reporting_enabled": false, "budget": null, "count_tasks": 0, "count_discussions": 0, "count_files": 0, "count_notes": 0 }, "category": null, "hourly_rates": { "1": 100 }, "label_ids": [], "task_lists": null }