Site Admin can view Stats
MODIFY
src/server/rest/v1/service/StatisticService.ts
src/server/rest/v1/service/StatisticService.ts
@@ -412,8 +412,13 @@ export default class StatisticService {
}
// User
if (Authorizations.isBasic(loggedUser)) {
+ if (Authorizations.isSiteAdmin(loggedUser)) {
+ // Only for current sites
+ filter.siteIDs = loggedUser.sitesAdmin;
+ } else {
// Only for current user
filter.userIDs = [loggedUser.id];
+ }
} else if (!Authorizations.isBasic(loggedUser) && filteredRequest.UserIDs) {
filter.userIDs = filteredRequest.UserIDs;
}

Site Admin can view Stats