-
Notifications
You must be signed in to change notification settings - Fork 0
api auth grant list
Alban LEROUX edited this page Mar 10, 2012
·
2 revisions
Retrieve all grants if user is not provided.
Retrieve all user's grant if user is provided.
Retrieve all entity's grant if entity is provided.
Require read grant access without filter
Require admin or self grant access with filter user
Require admin or self grant access with filter entity
NOTE:
selfgrant is not a real grant, it means that a authenticated user can act on its data.
NOTE:
Onlyuserorentitycan be provided at a time.
GET http://example.com/api/get/auth.grant.list/json/?user=jhon
{
"method" : "auth.grant.list",
"request" : { "user" : "jhon" }
}<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
<method>auth.grant.list</method>
<request>
<user>jhon</user>
</request>
</xml>{
"status" : "valid",
"response" :
{
"list" :
[
{ "grant" : "read", "name" : "read" },
{ "grant" : "write", "name" : "write" },
{ "grant" : "delete", "name" : "delete" },
{ "grant" : "config", "name" : "config" },
{ "grant" : "admin", "name" : "admin" }
]
}
}<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xml>
<status>valid</status>
<response>
<list><grant>read</grant><name>read</name></list>
<list><grant>write</grant><name>write</name></list>
<list><grant>delete</grant><name>delete</name></list>
<list><grant>config</grant><name>config</name></list>
<list><grant>admin</grant><name>admin</name></list>
</response>
</xml>- [user]: The user identifier
- [entity]: The entity identifier
-
list: Array of grant with:
- grant: Grant identifier.
- name: Grant name.
auth.config.get
auth.config.set
auth.request
auth.token
auth.refresh
auth.destroy
auth.user.add
auth.user.set
auth.user.del
auth.user.get
auth.user.list
auth.entity.add
auth.entity.set
auth.entity.del
auth.entity.get
auth.entity.list
auth.grant.add
auth.grant.set
auth.grant.del
auth.grant.get
auth.grant.list