Merge pull request #81 from DarkView/k30_channelArchiver
[K30] Migrated ChannelArchiver | Add isOwner to pluginUtils
This commit is contained in:
commit
a26ce611bb
6 changed files with 174 additions and 0 deletions
|
@ -72,3 +72,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