File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ Features:
223
223
hard coded user id number and replacing it with the current user's
224
224
id. Tracker templates updated to use it. (John Rouillard from a
225
225
patch by Jon C. Thomason)
226
+ - Add a /rest/data/user/roles REST endpoint. (John Rouillard)
226
227
227
228
2023-07-13 2.3.0
228
229
Original file line number Diff line number Diff line change @@ -1090,6 +1090,45 @@ allowed on a given endpoint.
1090
1090
1091
1091
Does not support PUT, DELETE or PATCH.
1092
1092
1093
+ /data/user/roles endpoint
1094
+ -------------------------
1095
+
1096
+ The list of valid roles for a user is not an actual class in the
1097
+ hyperdb. This endpoint returns a list of all defined roles if the
1098
+ user has the ``Admin`` role. Otherwise it returns a 403 - not
1099
+ authorized error. The output from this endpoint looks like::
1100
+
1101
+ {
1102
+ "data": {
1103
+ "collection": [
1104
+ {
1105
+ "id": "user",
1106
+ "name": "user"
1107
+ },
1108
+ {
1109
+ "id": "admin",
1110
+ "name": "admin"
1111
+ },
1112
+ {
1113
+ "id": "anonymous",
1114
+ "name": "anonymous"
1115
+ }
1116
+ ]
1117
+ }
1118
+ }
1119
+
1120
+ to mimic a class collection.
1121
+
1122
+ Unlike a real class collection endpoint, ``@total_size`` is not
1123
+ returned. Also it does not support any query options like: filtering,
1124
+ `@sort`, `@group`, `@verbose` etc. Note that the ``id`` property is
1125
+ not numeric.
1126
+
1127
+ This endpoint was introduced in release 2.4.0 to support a roles
1128
+ select/dropdown in the web component classhelper. This lets the web
1129
+ component helper implement the same function in the classic user class
1130
+ classhelper.
1131
+
1093
1132
/data/\ *class*/\ *id* item
1094
1133
---------------------------
1095
1134
You can’t perform that action at this time.
0 commit comments