Migrate ChannelArchiver to new Plugin structure, isOwner -> pluginUtils
This commit is contained in:
parent
a3d0ec03d9
commit
90ee4ad909
6 changed files with 174 additions and 0 deletions
|
@ -66,3 +66,13 @@ export function getBaseUrl(pluginData: PluginData<any>) {
|
|||
const knub = pluginData.getKnubInstance() as TZeppelinKnub;
|
||||
return knub.getGlobalConfig().url;
|
||||
}
|
||||
|
||||
export function isOwner(pluginData: PluginData<any>, userId: string) {
|
||||
const knub = pluginData.getKnubInstance() as TZeppelinKnub;
|
||||
const owners = knub.getGlobalConfig().owners;
|
||||
if (!owners) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return owners.includes(userId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue