Comments (4)
Roles goes hand in hand with authorization. I'm building a branch in which I propose using the gems cancancan
and rolify
to suffice our role authorization. The branch will include:
- Gem inclusions
- Definitions of roles in-code
- Specifications of roles onto users
- minor re-writes of existing authorization code
Here's an example of some existing authorization code:
(app/controllers/action_page_controller.rb)
#set_action_display_variables
.
.
.
# Redirect visitors to archived actions unless they have taken that action.
if @actionPage.archived? and @actionPage.archived_redirect_action_page_id and [email protected]?
taken_action = false
unless current_user.nil?
taken_action = true if current_user.events.actions.where(action_page_id: @actionPage).first
end
return redirect_to(action_page_path(@actionPage.archived_redirect_action_page_id)) unless taken_action || current_user.try(:admin?)
end
Before I do roles, I'd like to write a cucumber test so it's easy to check off that my changes are valid non-breaking changes.
from action-center-platform.
Is the partner role site-wide, or specific to a campaign? If it's site-wide, I worry that there might be a privacy policy issue in giving them ability to download CSVs.
from action-center-platform.
@elliotharmon I assume this is referring to the existing concept of partners in the app: they can download CSVs for their organization.
from action-center-platform.
Thanks @mfb. I didn't realize that existed already. Ignore my comment.
from action-center-platform.
Related Issues (20)
- Re-enable and improve signature live updates
- Add tool tip to Partner logo upload
- Remove double pagination from petitions HOT 1
- Changing filters on analytics returns 500 error
- About Face petition field should request city, not university HOT 1
- Fix alignment on petition action HOT 1
- Standardize postgres version across environments
- Make reference to Salsa privacy policy on state level actions HOT 1
- Make header text on act.eff.org clickable HOT 1
- Email fields should only accept valid email addresses HOT 1
- slashes in links mysteriously turning into :
- Fix share icon spacing in thank you email HOT 1
- Ruby 2.5 is EOL in March 2021 HOT 3
- Tests appear to be broken on master branch
- Tweak Admin preview / view UX
- SES signature version error
- Error Net::SMTPServerBusy: 454 Throttling failure: Daily message quota exceeded. HOT 3
- Update Action Center text for call action
- Add Mx. option
- Error when looking up representative
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-center-platform.