@@ -25,10 +25,10 @@ def consents(user):
25
25
clients = {t .client for t in consents }
26
26
27
27
nb_consents = len (consents )
28
- nb_preconsents = sum (
28
+ nb_trusted = sum (
29
29
1
30
30
for client in Backend .instance .query (models .Client )
31
- if client .preconsent and client not in clients
31
+ if client .trusted and client not in clients
32
32
)
33
33
34
34
return render_template (
@@ -38,33 +38,33 @@ def consents(user):
38
38
scope_details = SCOPE_DETAILS ,
39
39
ignored_scopes = ["openid" ],
40
40
nb_consents = nb_consents ,
41
- nb_preconsents = nb_preconsents ,
41
+ nb_trusted = nb_trusted ,
42
42
)
43
43
44
44
45
- @bp .route ("/pre-consents " )
45
+ @bp .route ("/trusted-applications " )
46
46
@user_needed ()
47
47
def pre_consents (user ):
48
48
consents = Backend .instance .query (models .Consent , subject = user )
49
49
clients = {t .client for t in consents }
50
- preconsented = [
50
+ trusted = [
51
51
client
52
52
for client in Backend .instance .query (models .Client )
53
- if client .preconsent and client not in clients
53
+ if client .trusted and client not in clients
54
54
]
55
55
56
56
nb_consents = len (consents )
57
- nb_preconsents = len (preconsented )
57
+ nb_trusted = len (trusted )
58
58
59
59
return render_template (
60
- "oidc/preconsent_list .html" ,
60
+ "oidc/trusted_list .html" ,
61
61
menuitem = "consents" ,
62
62
scope_details = SCOPE_DETAILS ,
63
63
# TODO: do not delegate this var to the templates, or set this explicitly in the templates.
64
64
ignored_scopes = ["openid" ],
65
- preconsented = preconsented ,
65
+ trusted = trusted ,
66
66
nb_consents = nb_consents ,
67
- nb_preconsents = nb_preconsents ,
67
+ nb_trusted = nb_trusted ,
68
68
)
69
69
70
70
@@ -106,10 +106,10 @@ def restore(user, consent):
106
106
return redirect (url_for ("oidc.consents.consents" ))
107
107
108
108
109
- @bp .route ("/revoke-preconsent /<client(required=False):client>" )
109
+ @bp .route ("/revoke-trusted /<client(required=False):client>" )
110
110
@user_needed ()
111
- def revoke_preconsent (user , client ):
112
- if not client or not client .preconsent :
111
+ def revoke_trusted (user , client ):
112
+ if not client or not client .trusted :
113
113
flash (_ ("Could not revoke this access" ), "error" )
114
114
return redirect (url_for ("oidc.consents.consents" ))
115
115
0 commit comments