Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1016531 // isAllowed

JavaX fragment (include)

static volatile O isAllowed_function; // func(S, O[]) -> bool
static volatile bool isAllowed_all = true;

sbool isAllowed(S askingMethod, O... args) {
  // check on VM level
  O f = vm_generalMap_get('isAllowed_function);
  if (f != null && !isTrue(callF(f, askingMethod, args))) false;
  
  // check locally
  ret isAllowed_all || isTrue(callF(isAllowed_function, askingMethod, args));
}

Author comment

Began life as a copy of #1016529

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016531
Snippet name: isAllowed
Eternal ID of this version: #1016531/9
Text MD5: 755e43f7f146598d826d2131cf891d6f
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-19 14:44:09
Source code size: 398 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 427 / 482
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)