aboutsummaryrefslogtreecommitdiff
path: root/app/controllers
Commit message (Collapse)AuthorAgeFilesLines
* [DEV] WIP: explore sso login alternativeIN COMMON Collective2021-03-262-1/+2
|
* Add UUIDResolverhellekin2021-03-221-0/+65
| | | | | | | | | | | | | | | | | The UUIDResolver adds a route at `/by-uuid/:uuid` that enables applications to request information about a given UUID. The UUID must be a Random UUID (version 4, see RFC 4122). If an invalid UUID is given, the controller will return 422 Unprocessable Entity. If a valid UUID is given: - 404 indicates that the UUID is not assigned to anything known to the system. - 302 indicates that the UUID was assigned to a record, and the User-Agent will be redirected to that record's Location as indicated in the response header. - 200 indicates that the UUID was assigned to more than one record (which is unlikely) and will list those records.
* [FIX] Availability of agentshellekin2021-02-113-17/+26
|
* [FIX] Restore REUSE 3.0 compliancehellekin2021-02-022-0/+8
|
* [FIX] Account for users without an avatar or grouphellekin2021-02-021-4/+3
| | | | | | | | | | | | | | | 1. Ensure new users belong to an Agent Users may come without the correct group information, leading to a situation where they have no Agent assigned to them. The application cannot handle this, so we ensure new users are at least associated to the new Anonymous Agent. 2. Introduce a default avatar Users coming without an avatar would see a broken view. Now they're assigned a default avatar, which shows the IN COMMON icon logo instead.
* Introduce an Anonymous Agenthellekin2021-02-021-1/+5
| | | | | | | | | | | | | Since we moved away from Roles it's important to maintain a default Agent that is distinct from the previous default IN COMMON Agent. Previously, a user without a proper group would be granted the `observer` role in the default Agent, enough to create new resources. Now, we consider anonymous users to be part of the Anonymous Agent, which also brings the possibility for them to edit yet to be accepted Resources.
* Upgrade Rails and add StimulusJS supporthellekin2021-01-223-11/+23
|
* Add Stimulus Map and Taxonomy (WIP)hellekin2020-11-123-0/+19
| | | | | | | | This commit add StimulusJS interaction for the map and taxonomy, as well as styling. It provides preliminary work to hook up live data on the map from the taxonomy.
* Merged masterhellekin2020-11-127-2/+134
|\
| * REUSE: Add AGPL-3.0-or-later to app/*hellekin2020-10-297-2/+134
| |
* | Add map supporthellekin2020-11-111-0/+1
|/ | | | | | | | | | | | This commit creates a dedicated Map model and moves the JavaScript from view to a Stimulus controller. - Stimulus.js https://stimulusjs.org - Leaflet.js https://leafletjs.org Upcoming resources: - https://discourse.stimulusjs.org/t/leafletjs-with-stimulusjs-on-rails-6/1343/4 - https://github.com/ghybs/leaflet-defaulticon-compatibility
* Enable switching Agenthellekin2020-10-091-0/+29
| | | | | | | Switching current Agent can help with roles and resource access. Go to your dashboard by clicking the avatar. Select agent and hit "Select"
* Fix Resource editionhellekin2020-10-091-0/+3
|
* Avoid errors on missing Taxonomyhellekin2020-10-091-4/+4
|
* [WIP] Add Resource business logichellekin2020-10-091-50/+60
| | | | | | | | Currently there's a bug throwing: TypeError (nil is not a symbol nor a string) When creating a Resource...
* Add some statshellekin2020-10-091-0/+20
|
* Add permissionshellekin2020-10-091-1/+3
| | | | | - `current_agent` is now a full instance of Agent - provide helpers to verify current user roles
* Make map more beautifulhellekin2020-10-081-0/+2
| | | | | | | | | | | | | This commit introduces a few things: 1. New `content_for` hooks for :debug, :head, and :body_end so that views code remains consistent and clean 2. Fullscreen map! 3. Welcome#index view, the Rails way It also moves controller-related code to the controller, Enjoy!
* Fix form, add flashhellekin2020-10-061-0/+50
|
* First pass at Resources...hellekin2020-10-061-1/+1
|
* First pass at listing Resourceshellekin2020-10-061-0/+42
| | | | | | This implements resource listing and pagination. See /resources
* Refactor authentication method to make it a bit more readablehellekin2020-10-061-35/+67
|
* First pass at something visiblehellekin2020-10-063-0/+38
| | | | This is a first version of the application, to go beyond simple authentication.
* Extract Role check to a background jobhellekin2020-10-061-9/+3
| | | | | | | When using SSO, the Discourse sends a list of the user groups. We take the opportunity to update Agency information for the user. This is performed as a background job, as it involves networked requests to the Discourse, e.g., to verify group ownership...
* Add Authentication logichellekin2020-10-052-0/+94
| | | | | | | | | | | The ApplicationController provides a `current_user` method (and helper) to access the authenticated user (if any). The WelcomeController provides minimal logic to authenticate against DiscourseSSO. Current state is that one can login and logout. Views need a lot of work.
* rails new incommon-map -d postgresql -C -Thellekin2020-10-052-0/+2