mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Limiting doc remove permission to owners.
Summary: Guest editors added to a document were able to remove it. This limits this permission by allowing only owners of a doc to delete it. Test Plan: Updated Reviewers: paulfitz Reviewed By: paulfitz Subscribers: dsagal, anaisconce Differential Revision: https://phab.getgrist.com/D3708
This commit is contained in:
@@ -26,6 +26,19 @@ export function configForUser(username: string): AxiosRequestConfig {
|
||||
return config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a permit key to the given config. Creates a new config object.
|
||||
*/
|
||||
export function configWithPermit(config: AxiosRequestConfig, permitKey: string): AxiosRequestConfig {
|
||||
return {
|
||||
...config,
|
||||
headers: {
|
||||
...config.headers,
|
||||
Permit: permitKey
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new user and return their personal org.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user