-
Notifications
You must be signed in to change notification settings - Fork 10
/
model.puml
97 lines (82 loc) · 1.3 KB
/
model.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@startuml
User "1" -- "*" Membership
Membership "*" -- "1" Group
User "1" -- "0..1" PasswordCredential
User "1" -- "*" UserProfileValue
UserProfileValue "*" -- "1" UserProfileField
Role "1" -- "*" RolePermission
RolePermission "*" -- "1" Permission
Realm "*" -- "1" Application
Assign "*" -- "1" Role
Assign "*" -- "1" Realm
Assign "*" -- "1" Group
class User {
account
name
email
}
class Group {
name
description
}
class Role {
name
description
}
class Permission {
name
description
}
class Realm {
name
description
application_id
}
class Application {
name
description
pass_to
}
class Realm {
name
description
}
class UserProfileValue {
user_profile_value_id
user_profile_field_id
value
}
class UserProfileField {
user_profile_field_id
name
json_name
is_required
is_identity
regular_expression
max_length
min_length
position
}
class PasswordCredential {
password
salt
createdAt
}
class UserAction {
actor
action_id
}
note as N1
SELECT permissions.id
FROM permissions
JOIN role_permissions USING(permission_id)
JOIN roles USING(role_id)
JOIN assigns USING(role_id)
JOIN realms USING(realm_id)
JOIN groups USING(group_id)
JOIN memberships USING(group_id)
JOIN users USING(user_id)
WHERE realms.url like ?
WHERE users.account = ?
end note
@enduml