profile.pl -- User profile configuration
Complementary to authentication, this module configures the maintenance
of user profiles.
There are several places where we need interaction with the user
profile:
- Prolog gathering and maintenance
- If a new user is found we want to welcome the user and
optionally complete the profile. For example, we may wish
to ask the
email
for the new user and start a process to
verify this.
- A user must be able to edit and delete his/her profile.
- A user must be able to migrate a profile, probably only from
a profile with the same verified email address.
- Profile usage
- Claim ownership
- Grant access. Access points in SWISH should be
- Execution of goals
- Normal sandboxed/not-sandboxed operations
- Grant/Deny access to certain sensitive (database)
predicates.
- Viewing/using code
- Saving code
- Save in general (e.g., do not save when anonymous)
- Make revisions to files that are not yours
- Save non-versioned files
- Add modules to the version store?
- Send notifications
- By mail
- Maintain notification queue for a user
- swish_config:reply_logged_in(+Options)[multifile]
- Hook logins from federated identity provides. Options processed:
- user_info(+UserInfo:Dict)
- Provides information about the user provided by the external
identity provider.
- reply(+Format)
- If Format =
html
, reply with an HTML page. Other values
are left for future extensions.
- profile_id(-Id)
- Unify Id with the found or created profile id.
- swish_config:reply_logged_out(+Options)[multifile]
- Perform a logout, removing the link to the session
- swish_config:user_profile(+Request, -Profile) is semidet[multifile]
- Provide the profile for the current user. The Profile dict contains
the profile keys and the
profile_id
key.
- swish_search:typeahead(+Set, +Query, -Match, +Options) is nondet[multifile]
- Find users based on their profile. This handler defines the set
user
. A Match is a dict holding:
- id:ProfileID
- label:Name
- A reasonable name for the user
- email:Email
- Only present if the match was found on the email.
- hit:hit{key:Key, value:Value}
- Field key and value on which the hit was found
- avatar:Avatar
- Avatar URL