Allows to check if a given user has a given permission on a given target. Returns true if the user has the permission, else false.
For other objects, e.g. Users, Datasources, etc., you can check the entity types here: https://reportserver.net/api/current/entities.html.
Valid permissions are:
The following example checks if the user with id 123 has Execute permission on the AccessRsSecurityTarget generic target, i.e. if the user is allowed to log in into ReportServer.
reportserver$ haspermission -g id:User:123 net.datenwerke.rs.core.service.genrights.access.AccessRsSecurityTarget Execute reportserver$ true
The following example checks if the user with id 123 has Read permission on the datasource with id 456.
reportserver$ haspermission id:User:123 id:DatasourceDefinition:456 Read reportserver$ false
Use: haspermission [-g] user target right