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

Feat/org bounty payment #642

Merged
merged 12 commits into from
Sep 13, 2023
Merged

Feat/org bounty payment #642

merged 12 commits into from
Sep 13, 2023

Conversation

elraphty
Copy link
Contributor

@elraphty elraphty commented Sep 6, 2023

Describe your changes

This feature allows organizations to add budget and pay bounty from the budget

Issue ticket number and link

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device

routes/index.go Outdated Show resolved Hide resolved
db/config.go Outdated
Comment on lines 236 to 237
hasRole = true
return hasRole
Copy link
Contributor

Choose a reason for hiding this comment

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

can just do return true here

Suggested change
hasRole = true
return hasRole
return true

if pubKeyFromAuth != org.OwnerPubKey {
userRoles := DB.GetUserRoles(uuid, pubKeyFromAuth)
hasRole = RolesCheck(userRoles, role)
return hasRole
Copy link
Contributor

Choose a reason for hiding this comment

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

can change to return false

Suggested change
return hasRole
return false


func UserHasAccess(pubKeyFromAuth string, uuid string, role string) bool {
org := DB.GetOrganizationByUuid(uuid)
var hasRole bool = false
Copy link
Contributor

Choose a reason for hiding this comment

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

can remove this line if you do the two comments below

db/db.go Outdated Show resolved Hide resolved
db/db.go Outdated Show resolved Hide resolved
db/db.go Show resolved Hide resolved
@elraphty elraphty merged commit 7b3d867 into master Sep 13, 2023
2 of 3 checks passed
@Evanfeenstra Evanfeenstra deleted the feat/org_bounty_payment branch January 26, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants