mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-12 14:51:42 +01:00
Make getBy* properly fallible
This commit is contained in:
parent
d4e6d048e3
commit
d49319fc26
@ -18,15 +18,19 @@ interface Resources {
|
|||||||
list @1 () -> ( resources :List(Resource) );
|
list @1 () -> ( resources :List(Resource) );
|
||||||
# Returns all resources that the user can currently disclose.
|
# Returns all resources that the user can currently disclose.
|
||||||
|
|
||||||
getByName @2 ( name :Text ) -> ( resource :Resource , dummy :UInt8 );
|
getByName @2 ( name :Text ) -> Fallible(Resource, GetError);
|
||||||
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
||||||
|
|
||||||
getByUrn @3 ( urn :Text ) -> ( resource :Resource );
|
getByUrn @3 ( urn :Text ) -> Fallible(Resource, GetError);
|
||||||
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
||||||
|
|
||||||
getByUrl @4 ( url :Text ) -> ( resource :Resource );
|
getByUrl @4 ( url :Text ) -> Fallible(Resource, GetError);
|
||||||
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
# Returns a NULL capability if the resource doesn't exist or a user doesn't have read permission for that resource.
|
||||||
|
|
||||||
|
struct GetError {
|
||||||
|
notFound @0 :Void;
|
||||||
|
}
|
||||||
|
|
||||||
acceptToken @5 ( token :SturdyRef, project :Project ) -> Fallible(Claim, AcceptTokenError);
|
acceptToken @5 ( token :SturdyRef, project :Project ) -> Fallible(Claim, AcceptTokenError);
|
||||||
|
|
||||||
acceptTokenSubstituteUser @7 ( token :SturdyRef, project :Project )
|
acceptTokenSubstituteUser @7 ( token :SturdyRef, project :Project )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user