Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Permissions for app users

Set up the user accounts and roles an app runs as - integration users, read roles limited by section or subtree, write roles limited to one folder and class, the policies OAuth and API keys need, checking a user's…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/publishing-workflow/permissions-for-app-users.md

On this page

Permissions for app users

This page is for app developers and the administrators they work with. Every API call runs as a user, and the user's roles decide everything the app can see and do. Getting the roles right is the most effective security measure an app has. The general guide is Roles and policies.

Contents

  1. Policies the APIs check
  2. Roles for typical apps
  3. Checking rights from the app
  4. Auditing app activity

Policies the APIs check

ActionPolicy
REST read of a node, object, list, countcontent/read
REST createcontent/create (Class, ParentClass, Section, Node, Subtree, Language limitations)
REST update (answers 501 after the check)content/edit
REST removecontent/remove of every location and everything below
Allow an OAuth app on the authorize pageoauth/authorize (optionally limited by siteaccess)
Make personal API keysapikey/create (optionally limited by Scope)
A remote servicethe policy in its access declaration, or public / user

Sources: Permissions of the REST interface, OAuth authorize policy, the service declarations of expservices.

Roles for typical apps

AppRolePolicies
Public reader"App reader"content/read limited to the sections or subtrees the app shows
Members' appthe members' role, plus oauth/authorizewhat members may read on the site
Field reporting"App reporter"content/read of the reports folder; content/create with Subtree = that folder and Class = the report class
Editors' companion appthe editors' rolesas in the administration, plus oauth/authorize

Rules of thumb:

  • One integration user per app, never a person's account and never the administrator.
  • No setup, class or user policies for an app's user.
  • Writes only below a folder made for the app, so a mistake cannot touch the rest of the site.
  • Review the role whenever the app gets a new feature.

Checking rights from the app

NeedService
Does the user have a module/function?expsession::access (answers yes, no or limited)
What may the user do with this node?expnode::rights::<node id>
Which classes may the user create here?expnode::creatableClasses::<node id>
Who is signed in?expsession::whoami

Use them to hide buttons the user cannot use; the server checks again on every call regardless.

Auditing app activity

The audit trail records what credentials and writes do, in the access channel and as service events:

EventsWhen
access.apikey.create, .revoke, .use (first use), .use.failedpersonal API keys (Auditing and limits)
access.expservices.token.create, .revoke, .failedexpservices tokens
service.<domain>.<method>every successful expservices write

An administrator reads them in Setup > Audit or from a shell:

./console exp:audit tail --channel=access --name='access.apikey.*' --lines=20 --allow-root-user

Ask for a look at the refusals (*.failed) after each app release: a spike means a bug in the app or someone trying stolen credentials. The audit itself is described in Audit.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x