Manage users

Login

To login into the application, use the following command:
1
dotnet occli.dll login -e [email protected]
Copied!
To logout, use the logout command:
1
dotnet occli.dll logout
Copied!

Register user

Invite a new user to the opencatapult by using the register command:
1
dotnet occli.dll account register --email [email protected]
Copied!
A confirmation email will be emailed to the user (Make sure you set the smtp properly) that will contain the temporary password, along with the link to login instruction. User will need to confirm their email, by opening the link in their email, before being able to login to the application
To list the users registered in the opencatapult, use the account list
1
dotnet occli.dll account list
Copied!

Update user

Update a user by specifying the user's email. Then specify other options to update
1
dotnet occli.dll account update --user [email protected] --firstname John --lastname Smith
Copied!

Update password

Update your own password by using the password update command. Then you will be prompt to enter the old and new password.
1
dotnet occli.dll account password update
Copied!

Reset password

When you forgot your password, you can request password reset using the following command:
1
dotnet occli.dll account password resettoken --user [email protected]
Copied!
The reset password token will then be emailed to you (Make sure you set the smtp properly). Afterward, use the following command to set your new password:
1
dotnet occli.dll account password reset --user [email protected] --token [emailed token]
Copied!

Remove user

Remove a user by specifying the user's email of the user to be removed
1
dotnet occli.dll account remove --user [email protected]
Copied!

Suspend user

Suspend a user by specifying the user's email of the user to be suspended
1
dotnet occli.dll account suspend --user [email protected]
Copied!

Activate user

Activate a suspended user by specifying the user's email of the user to be activated
1
dotnet occli.dll account activate --user [email protected]
Copied!

Set user role

The API have some authorization needed to access the endpoints. For example, only user with at least Basic permission can create a new project. To set this role for a user, use the following command.
1
dotnet occli.dll account setrole --user [email protected] --role Basic
Copied!

User Roles

Available user roles in catapult:
    Guest: Have access to only view project
    Basic: Have access to create a new project
    Administrator: Have all access within the application

Setting Email

Email is required during registration and reset password. To set the smtp, update the following section in API's appsettings.json:
1
"SmtpSetting": {
2
"Server": "localhost",
3
"Port": 0,
4
"Username": "username",
5
"Password": "password",
6
"SenderEmail": "[email protected]"
7
}
Copied!
Last modified 3yr ago