MMOframework
Why AI Playground Libraries Developers Agency
FR EN
Build a project live
Index

mmo-api-access

1 symbol · generated 30 Nov 2026

element

mmo-api-access

mmo-api-access.jhs:1

« My access » of the API console (mmo-api-console): the account the calls are made as, its roles, its rights (mmo.oauth's <mmo-scopes>, as the user's panel shows them: the tree, the rules of the account and of its roles, what each ends up being and why; a flat list of user/scopes.json for an API client), its perimeter, and « Can I…? »: an operation picked, mmo.oauth's access/explain.json says whether the account may call it and why -- each rule checked, the one deciding, what gives it; « What a right opens »: one of its rules, what mmo.oauth's access/scopes.json says it opens -- the operations declaring it, the collections of the data api by action. Everything is asked with the console's headers: the account of the session, or of the token pasted.

<mmo-api-access></mmo-api-access>
Extends
CustomShadowElement
The console gives it what it needs: `load`

Methods10

h(tag, attrs, children)

mmo-api-access.jhs:18
h(tag, attrs = null, ...children)
tag
attrs = null
...children
returnsElementMMO.core.dom.createElement: a string child is a text node

t(text, vars)

mmo-api-access.jhs:23
t(text, vars = {})
text
vars = {}
returnsstring$text translated, its {name} replaced by $vars'

get(path)

asyncmmo-api-access.jhs:33
async get(path)
pathstringrelative to the site
returnsPromise<*>the answer's data, null when refused

load(options)

asyncmmo-api-access.jhs:48

Draw the tab, for the account the calls are made as now.

async load(options)
optionsObjectheaders (a function: the headers of a call), operations (the console's, {method, path, operation}), collections (the data api's)
returnsPromise<void>

rightsOf(account)

asyncmmo-api-access.jhs:82
async rightsOf(account)
accountObjectwhat user/account.json says, without uid for an API client
returnsPromise<Element>the account's rights in <mmo-scopes>, read with the console's headers; the flat list of user/scopes.json when there is no account to give it, or no mmo.oauth's element. held keeps the rules it holds, for opens

ask()

mmo-api-access.jhs:110
ask()
returnsElement« Can I…? »: an operation, a collection for the data api, the answer of access/explain.json

opens()

mmo-api-access.jhs:130
opens()
returnsElement« What a right opens »: a rule, among those held or typed, and what access/scopes.json says of it

uses(answer)

mmo-api-access.jhs:149
uses(answer)
answerObjectwhat access/scopes.json answers: {scope, operations, collections}
returnsElementthe operations it opens, then the collections, each with its actions or its module checking it

explanation(answer)

mmo-api-access.jhs:164
explanation(answer)
answerObjectwhat access/explain.json answers
returnsElementthe verdict, then each check: allowed, refused, or narrowing

rights(scopes)

mmo-api-access.jhs:175
rights(scopes)
scopesObjectuser/scopes.json: id => {text, value, blame, scopes}
returnsElementthe rights held, each with what it allows; the refused ones folded