Explorer

definy.is-admin-account

description
(en) Whether the account is an administrator of this server (DEFINY_ADMIN_ACCOUNT_IDS, read_admin_account_ids). Only administrators can run programs on the server (docs/run-location.md)
type
Fn(account_id: String, then: Fn(is_admin: Boolean) -> @definy.service-io) -> @definy.service-io
expression
fn(account_id$0, then$1) =>
  #read_admin_account_ids<@definy.service-io>({
    then: fn(admin_account_ids$2) =>
      $1(
        is_admin: @core.list-contains-string(list: @definy.split-account-ids(text: $2, index: 0, current: "", acc: []), target: $0, index: 0)
      )
  })
visibility
public
definy.is-admin-account (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: IFGcL30ILAIwBkwQeuaU10rcwhGvpl57SWFUAz1XK0c
content hash: 5pRVah5_RBYzdSno-7swqcBrt-KnyL8Z_DLNWSwwe98