mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Allow doc owners to view document usage regardless of access rules
Summary: Document usage is now available for owners regardless ACL rules Test Plan: Updated Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3717
This commit is contained in:
parent
312d2331a8
commit
2ca407505b
@ -628,6 +628,10 @@ export class GranularAccess implements GranularAccessForBundle {
|
||||
options: {role?: Role | null} = {}
|
||||
): Promise<FilteredDocUsageSummary> {
|
||||
const result: FilteredDocUsageSummary = { ...docUsage };
|
||||
// Owners can see everything all the time.
|
||||
if (await this.isOwner(docSession)) {
|
||||
return result;
|
||||
}
|
||||
const role = options.role ?? await this.getNominalAccess(docSession);
|
||||
const hasEditRole = canEdit(role);
|
||||
if (!hasEditRole) { result.dataLimitStatus = null; }
|
||||
|
Loading…
Reference in New Issue
Block a user