Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#167730643 User Role Settings #39

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

OmoloyinA
Copy link
Collaborator

What does this PR do?

Have super-admin get the privilege to assign roles to users

Description of Task to be completed?

  • Modify users table to contain all roles
  • Create an endpoint for assigning users roles
  • Ensure that only super admins can access this endpoint

How should this be manually tested?

Any background context you want to provide?

What are the relevant pivotal tracker stories?

#167730643

Screenshots (if appropriate)

Questions:

OmoloyinA and others added 26 commits September 13, 2019 13:37
- Create a  table
- Install dependencies  and

[Start #167730641]
- enable a manager to approve a travel request of his/her direct report
- test the endpoint to ensure it works, even on Postman
- add Mock data for testing in the test folder

[Finishes #168437115]
- The push notification
- The email notification
Create a notifications table
Install dependencies socket.io and auto-bind
Prepare the server
Set-up the project
Display New travel Requests
Add Notifications
Send Push and Email Notifications
[Finishes: #167730641]
- The push notification
- The email notification
Create a notifications table
Install dependencies socket.io and auto-bind
Prepare the server
Set-up the project
Display New travel Requests
Add Notifications
Send Push and Email Notifications
[Finishes: #167730641]
- The push notification
- The email notification
- Create a notifications table
- Install dependencies socket.io and auto-bind
- Prepare the server
- Set-up the project
- Display New travel Requests
- Add Notifications
- Send Push and Email Notifications
[Finishes: #167730641]
- The push notification
- The email notification
- Create a notifications table
- Install dependencies socket.io and auto-bind
- Prepare the server
- Set-up the project
- Display New travel Requests
- Add Notifications
- Send Push and Email Notifications
[Finishes: #167730641]
return await travel_requests.update({ approval_status: 'accepted' }, { returning: true, where: { id } });
} catch (err) {
throw err;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 2 spaces but found 4 indent

try {
return await travel_requests.update({ approval_status: 'accepted' }, { returning: true, where: { id } });
} catch (err) {
throw err;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 4 spaces but found 8 indent

export const approveTravel = async(id) => {
try {
return await travel_requests.update({ approval_status: 'accepted' }, { returning: true, where: { id } });
} catch (err) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 2 spaces but found 4 indent

}
export const approveTravel = async(id) => {
try {
return await travel_requests.update({ approval_status: 'accepted' }, { returning: true, where: { id } });
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 4 spaces but found 8 indent

throw error;
}
export const approveTravel = async(id) => {
try {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 2 spaces but found 4 indent

try {
return await travel_requests.findAll({
where: {
user_id: userId,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 8 spaces but found 16 indent

export const showUsertravelsStatus = async(userId) => {
try {
return await travel_requests.findAll({
where: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 6 spaces but found 12 indent

}
export const showUsertravelsStatus = async(userId) => {
try {
return await travel_requests.findAll({
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 4 spaces but found 8 indent

throw err;
}
export const showUsertravelsStatus = async(userId) => {
try {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected indentation of 2 spaces but found 4 indent

} catch (err) {
throw err;
}
export const showUsertravelsStatus = async(userId) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before function parentheses space-before-function-paren

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants