Annotate

teal-src/util/roles.d.tl @ 12911:ab1164eda011

util.sasl: Add SASL OAUTHBEARER mechanism (RFC 7628)
author Matthew Wild <mwild1@gmail.com>
date Wed, 01 Mar 2023 12:55:00 +0000
parent 12661:1c391c17a907
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12661
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record util_roles
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 type context = any
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 record Role
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 id : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 name : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 description : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 default : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 priority : number -- or integer?
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 permissions : { string : boolean }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 may : function (Role, string, context)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 clone : function (Role, role_config)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 set_permission : function (Role, string, boolean, boolean)
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 is_role : function (any) : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 record role_config
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 name : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 description : string
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 default : boolean
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 priority : number -- or integer?
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 inherits : { Role }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 permissions : { string : boolean }
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29 new : function (role_config, Role) : Role
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 end
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31
1c391c17a907 util.roles: Add Teal interface declaration
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 return util_roles