Bookshop showing user info
Show current user name, locale and tenant (if available). Useful in deployments w/ real auth and tenant contexts.
This commit is contained in:
committed by
Christian Georgi
parent
5fc86d45ad
commit
bb55c432c9
17
bookshop/srv/user-service.cds
Normal file
17
bookshop/srv/user-service.cds
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Exposes user information
|
||||
*/
|
||||
@requires : 'authenticated-user'
|
||||
service UserService {
|
||||
|
||||
/**
|
||||
* The current user
|
||||
*/
|
||||
@odata.singleton
|
||||
entity Me {
|
||||
ID : String;
|
||||
locale : String;
|
||||
tenant : String;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user