-
Notifications
You must be signed in to change notification settings - Fork 8
Organization Users
Alexandru Chiraples edited this page Jul 22, 2017
·
1 revision
As an administrator, I need to be able to create, list, update and delete users in order to manage access to a specific organization.
- Everything happens in the context of a selected
Organization
. For more information please refer to the links presented below in the Other references topic. - The design should reflect the existing template from
#/index/samples
- A list of users affiliated to the selected
Organization
should be displayed having#/index/users
as its url and the following columns:-
Id
- the record's auto-generated id from database(we might get rid of it later) -
Nume
- the name of the user; this is actually the email address of the user -
Level
- user access level. Can either be0
or100
with actual labelsAdmin
andUser
. -
Status
- the status of the user which can be either1
or0
representingActiv
orInactiv
-
- A form with the ability to add a new user to the selected
Organization
should be displayed having#/index/users/new
as its url and the following fields:-
Nume
- email address of the user; for now no auto-complete will be implemented, thus the admin will need to provide the full email address -
Level
- access level,0
being the highest rank -
Status
- the status of the user which can be either1
or0
representingActiv
orInactiv
-
- A form with the ability to edit an existing user from the selected
Organization
should be displayed having#/index/users/:id
as its url and the following fields:-
Nume
- email address of the user; for now no auto-complete will be implemented, thus the admin will need to provide the full email address -
Level
- user access level. Can either be0
or100
with actual labelsAdmin
andUser
. -
Status
- the status of the user which can be eitherActiv
orInactiv
-
- Users which are not assigned to the
Organization
should not be allowed to access the Api. The restriction will be implemented using anActionFilter
which will check theorganizationId
from theendpoint
against the logged in user's associated organizations which are stored in the claims
Lists all users from the selected Organization
.
GET api/organizations/:organizationId/users
Parameters
Name | Type | Description |
---|---|---|
currentPage |
int | The page to display. |
itemsPerPage |
int | The number of items per page. Default is 10. |
sortAscending |
bool | Sorting style. True for ascending and False for descending. |
sortBy |
string | What to sort results by. Can be either id , level , status , user . Default: user . |
Response
{
"list" : [
{
"id": 1,
"name": "[email protected]",
"level": 0,
"status": 1,
}
],
"totalItems": 1
}
GET api/organizations/:organizationId/users/:id
Response
{
"id": 1,
"name": "[email protected]",
"level": 0,
"status": 1,
}
Creates a new user inside the selected Organization
.
POST api/organizations/:organizationId/users
Parameters
Name | Type | Description |
---|---|---|
name |
string | The name of the user. This is its actual email address. |
level |
int | User access level. Can either be 0 or 100 with actual labels Admin and User . |
status |
int | User status. Can either be 1 or 0 with actual labels Activ and Inactiv . |
Example
{
"name": "[email protected]",
"level": 0,
"status": 1,
}
Updates an existing user inside the selected Organization
.
PUT api/organizations/:organizationId/users
Parameters
Name | Type | Description |
---|---|---|
id |
long | Actual user id . This is a auto-generated database value. |
name |
string | The name of the user. This is its actual email address. |
level |
int | User access level. Can either be 0 or 100 with actual labels Admin and User . |
status |
int | User status. Can either be 1 or 0 with actual labels Activ and Inactiv . |
Example
{
"id": 1,
"level": 0,
"status": 0,
"name": "[email protected]",
}
- Quickstarts
- Configuration
- Documentation