3.0.6 • Published 1 year ago

@sakai-ui/sui-permissions v3.0.6

Weekly downloads
-
License
ECL-2.0
Repository
github
Last release
1 year ago

sui-permissions

Handles display and manipulation of permissions for a Sakai tool.

Usage, from the Roster tool:

Other attributes:

bundle-key: Allows to set the bundle name (f.ex: "announcement" or "org.sakaiproject.api.app.messagecenter.bundle.Messages"). By default, it will take the tool attribute value. on-refresh: Allows to set the return page location. By default, it will refresh the current URL. group-reference: Allows to set reference to get permissions from. By default, "/site/${portal.siteId}". Order is important. This attribute must be set before the tool attribute. disabled-groups: Disables all other options apart form "Site" in the Site/Group selector. By default, false (groups are shown). Order is important. This attribute must be set before the tool attribute.

This component needs to be able to lookup a tool's translations, and this happens via the sui-i18n.js module, loading the translations from a Sakai web service. The translations need to be jarred and put in TOMCAT/lib, and the permission translation keys need to start with "perm-", eg: perm-TOOLPERMISSION.

Example:

perm-roster.viewallmembers = View all participants perm-roster.viewhidden = View hidden participants perm-roster.export = Export roster perm-roster.viewgroup = View groups

Installation

npm i @sakai-ui/sui-permissions

Usage

<sui-permissions tool="roster"></sui-permissions>

Linting and formatting

To scan the project for linting and formatting errors, run

npm run lint

To automatically fix linting and formatting errors, run

npm run format

Testing with Web Test Runner

To execute a single test run:

npm run test

To run the tests in interactive watch mode run:

npm run test:watch