aboutsummaryrefslogtreecommitdiff
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
...
| * REUSE: Add LAL-1.3 license to SCSShellekin2020-10-2912-0/+153
| |
| * Add Markdown to format Resource.descriptionhellekin2020-10-272-1/+44
| |
* | Add map supporthellekin2020-11-114-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Remove example controllerhellekin2020-11-111-18/+0
| |
* | Adjust Style for mobile and stimulushellekin2020-11-117-4/+119
| |
* | Add stimulus.jshellekin2020-10-233-0/+29
| |
* | Remove bork agent_selector_form helperhellekin2020-10-092-11/+0
| |
* | Remove debug infohellekin2020-10-091-1/+0
| |
* | Grant maintainer to group ownerhellekin2020-10-091-0/+2
|/
* Enable switching Agenthellekin2020-10-094-3/+47
| | | | | | | 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-096-19/+24
|
* Fix flashes stylehellekin2020-10-091-5/+12
|
* Wrap debug with loginhellekin2020-10-091-4/+6
| | | | To avoid breaking on logout
* Avoid errors on missing Taxonomyhellekin2020-10-092-5/+5
|
* [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 a selector for categories and sectionshellekin2020-10-091-0/+10
|
* Add permissionshellekin2020-10-092-1/+11
| | | | | - `current_agent` is now a full instance of Agent - provide helpers to verify current user roles
* Scope routes to Agenthellekin2020-10-097-21/+98
| | | | | | | Since an Agent is required for all records, we scope the routes and get it present for free ;) This commit also adds resource views.
* Add Classifications and Resource validationshellekin2020-10-096-21/+88
| | | | | | | | | | | | | | | | - Turn `has_and_belongs_to_many` into `has_many :through`: now, resources and sections are related through Classifications. - Refactor usage of jsonb column to use ActiveRecord validations - Attention! store_accessor: NOTE: If you are using structured database data types (eg. PostgreSQL hstore/json, or MySQL 5.7+ json) there is no need for the serialization provided by .store. Simply use .store_accessor instead to generate the accessor methods. Be aware that these columns use a string keyed hash and do not allow access using a symbol. NOTE: The default validations with the exception of uniqueness will work. For example, if you want to check for uniqueness with hstore you will need to use a custom validation to handle it. https://api.rubyonrails.org/classes/ActiveRecord/Store.html
* Add categories, sections, and import datahellekin2020-10-082-0/+2
|
* Fix z-index for map and articlehellekin2020-10-082-1/+1
|
* Fix typohellekin2020-10-081-1/+1
|
* Merge branch 'map-style'hellekin2020-10-088-32/+177
|\
| * Make map more beautifulhellekin2020-10-088-32/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* | Changed 'has_ony' to 'has_one'Nemael2020-10-081-1/+1
|/
* Merge branch 'taxonomies'hellekin2020-10-083-0/+41
|\
| * Add model foundation for classificationshellekin2020-10-083-0/+41
| | | | | | | | | | | | | | | | Taxonomy > Category > Section This commit adds models for it. https://doc.incommon.cc/#classifications
* | Removed the hand-picked markers because they caused errorsNemael2020-10-081-3/+3
| |
* | Map added but no dynamic points placed, the current points are hand-picked ↵Nemael2020-10-081-0/+48
|/ | | | from the data
* Attempt to a fix for the edit resource pageNemael2020-10-081-2/+2
|
* Added leaflet gem and changed a bit the Edit Ressource page to be able to ↵Nemael2020-10-081-4/+6
| | | | edit categories
* Fix form, add flashhellekin2020-10-065-3/+88
|
* First pass at Resources...hellekin2020-10-064-4/+19
|
* First pass at listing Resourceshellekin2020-10-064-2/+77
| | | | | | This implements resource listing and pagination. See /resources
* Add Resource modelhellekin2020-10-062-0/+7
| | | | | | Resources will be stored as JSON, in the (GeoJSON) :feature column. They are assigned an UUID upon creation if they don't comme with one. They belong to an Agent.
* Refactor authentication method to make it a bit more readablehellekin2020-10-061-35/+67
|
* Fix URLhellekin2020-10-061-1/+1
|
* First pass at something visiblehellekin2020-10-0620-8/+333
| | | | This is a first version of the application, to go beyond simple authentication.
* Extract Role check to a background jobhellekin2020-10-062-9/+57
| | | | | | | 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 instance methodshellekin2020-10-061-0/+10
| | | | | | | The Agency class can `grant` and `revoke` roles for a given Agent and User. Since it is primarily used in context of both an Agent and User, we add convenience methods so that one can grant or revoke a role simply by passing the desired role to the instance.
* Add Authentication logichellekin2020-10-057-0/+127
| | | | | | | | | | | 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.
* Add Agent and Agency modelshellekin2020-10-052-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since IN COMMON is about collective management of data we're using the concept of Agent to describe a group of users acting together. In ActivityPub terms, Agent will be the Actor when manipulating data, so that any individual User (or application) member of this Agent will be able to manipulate data on behalf of this Agent. Therefore a User has many Agencies, and an Agent as well: the Agency model allows not only to create a joint table between Agents and Users, but also to manage User roles within the related Agent. Roles are defined as: - observer: one who can read and review or flag data - editor: one who create or edit data - maintainer: one who can edit data and manage maps - leader: one who can manage roles A User may have zero or more roles in an Agent. A User without a Agency record for a specific Agent will only be able to 'observe' public data from this Agent. (Note that this is not currently specified, but matches existing reflection on Agents) https://doc.incommon.cc/#agents
* Configure Discourse SSOhellekin2020-10-053-1/+8
| | | | | | | | We're creating a minimal User model that will be filled from SSO. We also configure Inflections so we can use SSO instead of Sso which looks weird for a module named after an acronym. Use Discourse as SSO: https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974
* Add Discourse SSO codehellekin2020-10-052-0/+99
|
* rails new incommon-map -d postgresql -C -Thellekin2020-10-0514-0/+80