Skip to content

Conversation

@prateekj117
Copy link
Member

Fixes #6049

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

Short description of what this resolves:

Any user was able to create event discount code.

Changes proposed in this pull request:

-Only admin should be allowed to create an event discount code.

@prateekj117
Copy link
Member Author

Copy link
Member

@kushthedude kushthedude left a comment

Choose a reason for hiding this comment

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

Change the title of PR to Event Organiser of Event Admin,

@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #6050 into development will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #6050   +/-   ##
============================================
  Coverage        66.27%   66.27%           
============================================
  Files              285      285           
  Lines            14015    14015           
============================================
  Hits              9288     9288           
  Misses            4727     4727
Impacted Files Coverage Δ
app/api/discount_codes.py 22.72% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f253f5...84f3910. Read the comment docs.

@uds5501
Copy link
Contributor

uds5501 commented Jun 14, 2019

@kushthedude , It's actually only admin. @prateekj117 is right 😅 .
The event discount code creation rights rest with admins , while ticket discount codes can be created by Event Organisers .

@kushthedude
Copy link
Member

Oh my bad @prateekj117 , @uds5501 , I misunderstood it

@kushthedude
Copy link
Member

@prateekj117 @iamareebjamal Should this PR be merged, As Event Discount Code is functional for now?

@iamareebjamal iamareebjamal changed the title Only admin should be allowed to create event discount codes fix: Only admin should be allowed to create event discount codes Jun 14, 2019
@auto-label auto-label bot added the fix label Jun 14, 2019
@iamareebjamal iamareebjamal requested a review from abhinavk96 June 14, 2019 21:02
@iamareebjamal
Copy link
Member

@CosmicCoder96 Please verify

Copy link
Member

@shreyanshdwivedi shreyanshdwivedi left a comment

Choose a reason for hiding this comment

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

Just a note : we are not using the event discount code for now, but fixing the code LGTM 👍

@iamareebjamal iamareebjamal merged commit fd99ecf into fossasia:development Jun 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only event organizers should be able to create discount codes for an event.

7 participants