forked from Telodendria/Telodendria
Apply modified #60
This commit is contained in:
parent
c8c4c705a5
commit
e73cea64b7
1 changed files with 12 additions and 10 deletions
|
@ -43,7 +43,8 @@ Here are all of the admin privileges a user can have:
|
||||||
.It Dv DEACTIVATE
|
.It Dv DEACTIVATE
|
||||||
This allows an user to deactivate any users using
|
This allows an user to deactivate any users using
|
||||||
the
|
the
|
||||||
.Dv DELETE /_telodendria/admin/disable/[localpart]
|
.Em DELETE
|
||||||
|
/_telodendria/admin/disable/[localpart]
|
||||||
endpoint.
|
endpoint.
|
||||||
.It Dv ISSUE_TOKENS
|
.It Dv ISSUE_TOKENS
|
||||||
This allows users to create, modify and delete registration
|
This allows users to create, modify and delete registration
|
||||||
|
@ -54,7 +55,7 @@ Users with this privilege can use
|
||||||
admin endpoint(and some others).
|
admin endpoint(and some others).
|
||||||
.Em THIS PRIVILEGE SHOULD ONLY BE USED WITH TRUSTED USERS.
|
.Em THIS PRIVILEGE SHOULD ONLY BE USED WITH TRUSTED USERS.
|
||||||
.Sh API ENDPOINTS
|
.Sh API ENDPOINTS
|
||||||
.Ss GET /_telodendria/admin/privileges
|
.Ss Sy GET No /_telodendria/admin/privileges
|
||||||
.Pp
|
.Pp
|
||||||
Get the priviledges of the user that owns the provided access token.
|
Get the priviledges of the user that owns the provided access token.
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -90,7 +91,7 @@ privileges;list;The same data structure described in the database.
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss DELETE /_telodendria/admin/deactivate/[localpart]
|
.Ss Sy DELETE No /_telodendria/admin/deactivate/[localpart]
|
||||||
.Pp
|
.Pp
|
||||||
Deactivates a local user, optionally with a reason.
|
Deactivates a local user, optionally with a reason.
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -167,10 +168,10 @@ error;string;Human-readable explanation of the privilege issue.
|
||||||
"error": "Forbidden access. Bad permissions or not authenticated."
|
"error": "Forbidden access. Bad permissions or not authenticated."
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss PUT /_telodendria/admin/deactivate/[localpart]
|
.Ss Sy PUT No /_telodendria/admin/deactivate/[localpart]
|
||||||
.TS
|
.TS
|
||||||
tab(;) allbox center;
|
tab(;) allbox center;
|
||||||
l l.
|
l l l.
|
||||||
Requires Token;Rate Limited;Permissions
|
Requires Token;Rate Limited;Permissions
|
||||||
Yes;Yes;DEACTIVATE
|
Yes;Yes;DEACTIVATE
|
||||||
.TE
|
.TE
|
||||||
|
@ -203,7 +204,7 @@ error;string;Human-readable explanation of the privilege issue.
|
||||||
"error": "Forbidden access. Bad permissions or not authenticated."
|
"error": "Forbidden access. Bad permissions or not authenticated."
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss GET /_telodendria/admin/tokens
|
.Ss Sy GET No /_telodendria/admin/tokens
|
||||||
.Pp
|
.Pp
|
||||||
Gets a list of
|
Gets a list of
|
||||||
.Em all
|
.Em all
|
||||||
|
@ -241,7 +242,7 @@ tab(;) allbox center;
|
||||||
l l l.
|
l l l.
|
||||||
Field;Type;Description
|
Field;Type;Description
|
||||||
name;string;The token's name.
|
name;string;The token's name.
|
||||||
created_by;localpart; The user who has created token.
|
created_by;localpart;The user who has created token.
|
||||||
created_on;timestamp;The creation date of the token.
|
created_on;timestamp;The creation date of the token.
|
||||||
expires_on;timestamp;T{
|
expires_on;timestamp;T{
|
||||||
The token's expiration date, or 0 if it does not
|
The token's expiration date, or 0 if it does not
|
||||||
|
@ -251,6 +252,7 @@ used;integer;The number of times the token was used.
|
||||||
uses;integer;T{
|
uses;integer;T{
|
||||||
The number of uses remaining for the token, or -1 if
|
The number of uses remaining for the token, or -1 if
|
||||||
there are an unlimited number of uses remaining.
|
there are an unlimited number of uses remaining.
|
||||||
|
T}
|
||||||
.TE
|
.TE
|
||||||
.Pp
|
.Pp
|
||||||
403 Response JSON Format:
|
403 Response JSON Format:
|
||||||
|
@ -286,7 +288,7 @@ error;string;Human-readable explanation of the privilege issue.
|
||||||
"error": "Forbidden access. Bad permissions or not authenticated."
|
"error": "Forbidden access. Bad permissions or not authenticated."
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss GET /_telodendria/admin/tokens/[token]
|
.Ss Sy GET No /_telodendria/admin/tokens/[token]
|
||||||
.Pp
|
.Pp
|
||||||
Returns information about a specific registration token.
|
Returns information about a specific registration token.
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -333,7 +335,7 @@ T}
|
||||||
"uses": 3
|
"uses": 3
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss POST /_telodendria/admin/tokens
|
.Ss Sy POST No /_telodendria/admin/tokens
|
||||||
.Pp
|
.Pp
|
||||||
Adds a registration token, and setup expiry date and max uses.
|
Adds a registration token, and setup expiry date and max uses.
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -418,7 +420,7 @@ T}
|
||||||
"error": "Forbidden access. Bad permissions or not authenticated."
|
"error": "Forbidden access. Bad permissions or not authenticated."
|
||||||
}
|
}
|
||||||
.Ed
|
.Ed
|
||||||
.Ss DELETE /_telodendria/admin/tokens/[tokenname]
|
.Ss Sy DELETE No /_telodendria/admin/tokens/[tokenname]
|
||||||
.TS
|
.TS
|
||||||
tab(;) allbox center;
|
tab(;) allbox center;
|
||||||
l l l.
|
l l l.
|
||||||
|
|
Loading…
Reference in a new issue