Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
75 lines
2.5 KiB
TypeScript
75 lines
2.5 KiB
TypeScript
// Module ID: 4267
|
|
// Function ID: 4268
|
|
// Name: RolePermissionUtils
|
|
// Dependencies: [2016, 1074, 1086, 2]
|
|
// Exports: hasViewChannelPermission, isChannelAccessDeniedBy, isChannelAccessGrantedBy
|
|
|
|
// Module 4267 (RolePermissionUtils)
|
|
import Constants from "Constants" /* 1074 */;
|
|
import BigFlagUtilsAll from "BigFlagUtils" /* 1086 */;
|
|
import GuildRoleRecord from "GuildRoleRecord" /* 2016 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const hasPermission = GuildRoleRecord.hasPermission;
|
|
const Permissions = Constants.Permissions;
|
|
const result = size.fileFinishedImporting("modules/guild_role_subscriptions/RolePermissionUtils.tsx");
|
|
|
|
export const hasViewChannelPermission = function hasViewChannelPermission(arg0) {
|
|
return hasPermission(arg0, Permissions.VIEW_CHANNEL);
|
|
};
|
|
export const isChannelAccessDeniedBy = function isChannelAccessDeniedBy(isGuildVocal, deny) {
|
|
let tmp = null != deny;
|
|
if (tmp) {
|
|
let hasItem = BigFlagUtilsAll.has(deny.deny, Permissions.VIEW_CHANNEL);
|
|
if (!hasItem) {
|
|
let isGuildVocalResult = isGuildVocal.isGuildVocal();
|
|
if (isGuildVocalResult) {
|
|
isGuildVocalResult = tmp2(1086).has(deny.deny, tmp4.CONNECT);
|
|
const tmp2Result = tmp2(1086);
|
|
}
|
|
hasItem = isGuildVocalResult;
|
|
}
|
|
tmp = hasItem;
|
|
tmp2 = importAll;
|
|
tmp4 = Permissions;
|
|
}
|
|
return tmp;
|
|
};
|
|
export const isChannelAccessGrantedBy = function isChannelAccessGrantedBy(isGuildVocal, deny) {
|
|
let tmp = null != deny;
|
|
if (tmp) {
|
|
let tmp3 = null != deny;
|
|
if (tmp3) {
|
|
let hasItem1 = BigFlagUtilsAll.has(deny.deny, Permissions.VIEW_CHANNEL);
|
|
if (!hasItem1) {
|
|
let isGuildVocalResult = isGuildVocal.isGuildVocal();
|
|
if (isGuildVocalResult) {
|
|
isGuildVocalResult = tmp4(1086).has(deny.deny, tmp6.CONNECT);
|
|
const tmp4Result = tmp4(1086);
|
|
}
|
|
hasItem1 = isGuildVocalResult;
|
|
}
|
|
tmp3 = hasItem1;
|
|
tmp4 = importAll;
|
|
tmp6 = Permissions;
|
|
}
|
|
let tmp9 = !tmp3;
|
|
if (!tmp3) {
|
|
let hasItem2 = BigFlagUtilsAll.has(deny.allow, Permissions.VIEW_CHANNEL);
|
|
if (hasItem2) {
|
|
const isGuildVocalResult1 = isGuildVocal.isGuildVocal();
|
|
let hasItem = !isGuildVocalResult1;
|
|
if (isGuildVocalResult1) {
|
|
hasItem = tmp10(1086).has(deny.allow, tmp12.CONNECT);
|
|
const tmp10Result = tmp10(1086);
|
|
}
|
|
hasItem2 = hasItem;
|
|
}
|
|
tmp9 = hasItem2;
|
|
tmp10 = importAll;
|
|
tmp12 = Permissions;
|
|
}
|
|
tmp = tmp9;
|
|
}
|
|
return tmp;
|
|
};
|