mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) allow a doc owner to test access as a different user
Summary: This adds back-end support for query parameters `aclAsUser_` and `aclAsUserId_` which, when either is present, direct Grist to process granular access control rules from the point of view of that user (specified by email or id respectively). Some front end support is added, in the form of a tag that shows up when in this mode, and a way to cancel the mode. No friendly way to initiate the mode is offered yet. Test Plan: added test Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2704
This commit is contained in:
@@ -359,7 +359,7 @@ export class HomeDBManager extends EventEmitter {
|
||||
}
|
||||
|
||||
public getUser(userId: number): Promise<User|undefined> {
|
||||
return User.findOne(userId);
|
||||
return User.findOne(userId, {relations: ["logins"]});
|
||||
}
|
||||
|
||||
public async getFullUser(userId: number): Promise<FullUser> {
|
||||
|
||||
Reference in New Issue
Block a user