Skip to main content

"magically" extend tiddlyweb user capabilities

Project description

tiddlywebplugins.magicuser is a tool to extend the capabilities of a user in TiddlyWeb.

When an authentic user is extracted from the credentials extractor system, the username and their roles are places into the WSGI environment as the value of a tiddlyweb.usersign key.

magicuser extends these capabilities by providing a model for adding additional keys and values to the tiddlyweb.usersign dictionary.

It does this by looking in a bag, by default called MAGICUSER, for a tiddler with the same title as the value of the name key in the usersign dict. If that tiddler is present, it is loaded and it’s attributes and fields are used (as shown in the code) to add to the usersign.

BEFORE the magicuser bag is inspected, a username translation layer is engaged. This allow N different authenticated usersigns to be treated as one core usersign within TiddlyWeb. It works as follows:

A tiddler with a title that is the same as the extracted usersign name is retrieved from a bag by default called MAPUSER. If the tiddler exists and has the field mapped_user the value of the field replaces the name in the usersign. It is that name that is then used during the magicuser stage.

This plugin provides no facility for putting tiddlers in either the MAGICUSER or MAPUSER bags. Other code (either client side or server side) is expected to do that.

Licensed under the same terms as TiddlyWeb. BSD License.

Copyright 2011, Chris Dent <cdent@peermore.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tiddlywebplugins.magicuser-0.4.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file tiddlywebplugins.magicuser-0.4.tar.gz.

File metadata

File hashes

Hashes for tiddlywebplugins.magicuser-0.4.tar.gz
Algorithm Hash digest
SHA256 8c8028b77671a03472297d7a3af2281c920b65c4fd0e1ad21280f81a26a9ddf0
MD5 2e197f38a853da114aacb88f395660f1
BLAKE2b-256 ed4fa6637d1a4e5b9574e294553f36e4f8f16bda59dd6703ba6fd22e7d21daa9

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page