If you wish to establish a role for a user of the TiddlyWeb system, you need to create or update a User in the datastore.

You may do this from the command line using the twanager adduser command. If you wish to make the changes using Python code, see How do I create or update a User object in code?.

There are two ways to update an existing user from the command line:
To add a role to the user barney with password dinosaur and the roles ADMIN and science do the following:
twanager adduser barney dinosaur ADMIN science


Or
twanager addrole barney ADMIN science


If you are using OpenID or a similar service that uses it's own password or authentication mechanism but would like for the user to have roles in the datastore you may create an entry for the user with an empty password:
twanager adduser barney.example.com '' ADMIN science


See also: