Add read actions to all unprefixed scopes

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-23 10:36:32 +02:00
parent 002c91ba11
commit 20b9321de3
11 changed files with 276 additions and 1 deletions

View File

@@ -37,6 +37,10 @@ func (v OAuth2Scope) String() string {
return string(v)
}
func (v OAuth2Scope) IsRead() bool {
return strings.HasSuffix(string(v), ":read")
}
func (v OAuth2Scope) MarshalText() ([]byte, error) {
return []byte(v.String()), nil
}