Giter Site home page Giter Site logo

diputaciodegirona / decidim-verify_wo_registration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from coditramuntana/decidim-verify_wo_registration

0.0 0.0 0.0 172 KB

Adds the hability for Proposals and Budgets components to allow users to give support without being registered

License: MIT License

Ruby 81.15% HTML 18.85%

decidim-verify_wo_registration's Introduction

Decidim::VerifyWoRegistration

Adds the hability for proposals and budgets components to allow users to give support without being registered. Enabling this feature the user is requested for verification and then, on success, logged in in a 30min session..

Usage

VerifyWoRegistration will be available as a Component for a Participatory Space.

Installation

Add this line to your application's Gemfile:

gem 'decidim-verify_wo_registration'

And then execute:

bundle

Usage

This module allows admins to enable participants to open sessions from Proposals and Budgets components (login in) without being registered.

For this feature to be enabled admins should do two things:

  • navigate to the corresponding component, select the "Enable suports without registration (user only verifies)" ("Poder donar suports sense registre (només verificant-se)") check and save.
  • navigate to this component's permissions, and select a direct verifier for some of its actions. Note that multi-step verifiers are not supported.

This will enable the feature in the public views.

Once enabled, non registered (thus not logged in) participants will have to navigate to the given component (a proposal or a budget) and click in the support/vote/select project action. The login modal now will have a new "I have no user and I do not want to" button that takes the participant to a verification screen. Once the user is correctly verified, a 30min session starts for her to participate.

Note that although the only way for participants to open a session is by clicking the "Support" button, once verified, she will be able to perform all the actions that require the authentications she has verified for.

Run tests

Create a dummy app in your application (if not present):

bin/rails decidim:generate_external_test_app
cd spec/decidim_dummy_app/
bundle exec rails decidim-verify_wo_registration:install:migrations
RAILS_ENV=test bundle exec rails db:migrate

Edit dummy_app's config/application.rb file to enforce railties ordering:

module DecidimDepartmentAdminTestApp
  class Application < Rails::Application

...
    config.railties_order = [Decidim::Core::Engine, Decidim::DepartmentAdmin::Engine, :main_app, :all]
...

  end
end

And run tests:

bundle exec rspec spec

Contributing

See Decidim.

License

This engine is distributed under the GNU AFFERO GENERAL PUBLIC LICENSE.

decidim-verify_wo_registration's People

Contributors

mrcasals avatar operez-ddgi avatar tramuntanal avatar

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.