Git Product home page Git Product logo

Comments (4)

TheNotary avatar TheNotary commented on June 4, 2024

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.

elliotharmon avatar elliotharmon commented on June 4, 2024

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.

mfb avatar mfb commented on June 4, 2024

@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.

elliotharmon avatar elliotharmon commented on June 4, 2024

Thanks @mfb. I didn't realize that existed already. Ignore my comment.

from action-center-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.