rebasing from master (#27)
* added data structures for testing

* renamed token_permission_type to plural to follow convention of fixtures

* added gem to allow testing of controllers

* began implimenting testing for projects controller

* fixed auth to reject empty string

* added data structures for testing

* added data structures for testing

* removed old unnecissary data structures from fixtures

* added forgotten view for org-admins giving user's api permissions

* updated .gitignore

* added gem to allow testing of controllers

* began implimenting testing for projects controller

* fixed auth to reject empty string

* added data structures for testing

* added data structures for testing

* removed old unnecissary data structures from fixtures

* added forgotten view for org-admins giving user's api permissions

* updated .gitignore

* fixed leftover merge conflict in .gitignore

* updated org-admin view of users for rails 4.2 compatability

* fiexed a bug where user's api token permissions wouldnt display

* fixed syntax error

* changed guidance_group to guidance_groups for consistancy with api spec

* fix roadmap route

* bugfixing auth for api

* removed token_permission as it was accidentially re-added by a merge

* added gem to allow testing of controllers

* began implimenting testing for projects controller

* fixed auth to reject empty string

* added data structures for testing

* added data structures for testing

* removed old unnecissary data structures from fixtures

* added forgotten view for org-admins giving user's api permissions

* updated .gitignore

* removed old unnecissary data structures from fixtures

* updated .gitignore

* updated org-admin view of users for rails 4.2 compatability

* fiexed a bug where user's api token permissions wouldnt display

* fixed syntax error

* changed guidance_group to guidance_groups for consistancy with api spec

* bugfixing auth for api

* modified schema

* removed admin interface to token_permission, another forgotten side-effect

* removed admin interface to token_permission, another forgotten side-effect

* modified return structure of guidance_groups API to reflect current spec

* removed guidances api endpoint as no longer necissary

* added templates api endpoint

* commit

* commit

* initial commit of untested statistics API

* updated Statistics API and added bugfixes

* added aditional seeds for api token_permission_types

* added docs for stats api, also passing tests

* added fucntionality to give org_admin priveleges through the org_admin interface

* corrected statistics API to handle null dates and filter projects correctly

* addedrestriction that users must be confirmed to be counted by stats api

* added documentation to dmptemplates api controller

* added org_id field to plans metadata as a returned plan can belong to somebody else's organisation

* initial passover of removing magic strings

* added comment to I18n_constant and fixed missing magic string

* fixed the magic strings function

* removed duplicate gem from gemfile

* migrations and routes tests

* changed gem dependancies and fixed syntax bug

* fixed bug where show plans view only displayed first letter of columns

* aliased

* added documentation to organisation, phase, and part of plans

* added documentation to organisation, phase, and part of plans

* added documentation to model for plan

* added documentation to project model

* added documentation to project_group model

*  added documentation to remaining models

* fixed admin logout bug

*  removed hard-coded references to DCC

* fixed bug in dmptemplate with magicstrings

* dropdown and org language setting

* test

* commit

* migrations and routes tests

* aliased

* dropdown and org language setting

* test

* remove typo

* fixed parentheses bug in api/projects_controller

* fix

* merging

* remove git merge conflicts artifacts

* added gemfile, environments, and an initaliser to allow merge

* fix locales picking

* installed new gem pundit

* super_admin area for languages, changes to langauge initializer to fix migrations issue and org language priority in user language picking

* added magic string and constant structure for auth

* add association between organisation and language

* proof of concept for pundit
-got the pundit policy file working
-verified that it blocked/allowed users with correct permissions
-fixed a bug in user model where the magic strings had been poorly defined
-

* added pundit authorization to users

* change how questions are displayed in plans to honour formatting

* added pundit to users controller

* added pundit auth to organisations controller

* removed depricated controller

*  bugfix to ensure organisations auth working

* added pundit auth to guidances

*  added pundit auth to guidance groups

* added pundit auth to dmptemplates controller

* added default redirect to 403 page for unauth

* changed empty? to blank? as it broke seedfile

* updated authorization for all controllers

-changed from passing through records as feature not supported
-changed 403 error to better reflect what's happening
-added scope to many of the indexes
-added organisation-scope to requests from old org-admin roles
-renamed guidance_groups_policy to guidance_group_policy.rb

* Merging current stable development branch into master (#23)

This is our unofficial v.0.1.0 release. It includes:
- Rails 4.2 migration
- Internationalization
- API
- Institutional logo upload (thanks to Weiwei and the Univ. of Alberta)
- Generic branding
- General cleanup of code and bug fixes

* finished implimenting new authorization scheme in dmptemplates

* updated seeds file

* installed new gem pundit

* added magic string and constant structure for auth

* proof of concept for pundit
-got the pundit policy file working
-verified that it blocked/allowed users with correct permissions
-fixed a bug in user model where the magic strings had been poorly defined
-

* added pundit authorization to users

* added pundit to users controller

* added pundit auth to organisations controller

* removed depricated controller

*  bugfix to ensure organisations auth working

* added pundit auth to guidances

*  added pundit auth to guidance groups

* added pundit auth to dmptemplates controller

* added default redirect to 403 page for unauth

* updated authorization for all controllers

-changed from passing through records as feature not supported
-changed 403 error to better reflect what's happening
-added scope to many of the indexes
-added organisation-scope to requests from old org-admin roles
-renamed guidance_groups_policy to guidance_group_policy.rb

* finished implimenting new authorization scheme in dmptemplates

* updated seeds file

* bugfixes to auth

* explicit bullet style for questions and raw questoin test in form

* implimenting auth changes in the views

* added granting api to orgs permission

* implimenting auth changes in the views

* added granting api to orgs permission

* removed cancancan and rollify

* updated documentation syntax for some models

* removed initalizer for rollify

* ensured users loose roles upon org changing and added depricated tags to roles

* added functionality to port users from old auth structure to new

* updated funciton to ensure no dupelicates

* updated the organisation_id = (new) in user model, was causing seed to fail

* fixed bug in can_<do permission>? functions

* turns out we do user user_org_roles to determine organisation, re-added

* added debug to update_user_permissions

* made changes to update user permissions

* made changed to user.rb

* finished changes to update_user_permissions

* added docs to new function

* added new permissions to api

* fix various issues to do with display of formatting in questions

* implimenting auth changes in the views

* added granting api to orgs permission

* removed cancancan and rollify

* updated documentation syntax for some models

* removed initalizer for rollify

* ensured users loose roles upon org changing and added depricated tags to roles

* added functionality to port users from old auth structure to new

* updated funciton to ensure no dupelicates

* updated the organisation_id = (new) in user model, was causing seed to fail

* fixed bug in can_<do permission>? functions

* turns out we do user user_org_roles to determine organisation, re-added

* added debug to update_user_permissions

* made changes to update user permissions

* overhaul of performance of users admin-index

* fixed a bug where users' api_tokens would display if they had none

* added ability to grant permissions to other users

* implimenting auth changes in the views

* added granting api to orgs permission

* removed cancancan and rollify

* updated documentation syntax for some models

* removed initalizer for rollify

* ensured users loose roles upon org changing and added depricated tags to roles

* added functionality to port users from old auth structure to new

* updated funciton to ensure no dupelicates

* updated the organisation_id = (new) in user model, was causing seed to fail

* fixed bug in can_<do permission>? functions

* turns out we do user user_org_roles to determine organisation, re-added

* added debug to update_user_permissions

* made changes to update user permissions

* made changed to user.rb

* finished changes to update_user_permissions

* added docs to new function

* added new permissions to api

* overhaul of performance of users admin-index

* fixed a bug where users' api_tokens would display if they had none

* added ability to grant permissions to other users

* updated efficiency of update_user_permissions
dev
1 parent 8f296fe commit e85ea1d7812e71b86527377fe7121bebdfc155e4
@Brian Riley Brian Riley authored on 1 Sep 2016
GitHub committed on 1 Sep 2016
Showing 62 changed files
View
.travis.yml
View
Gemfile
View
Gemfile.lock
View
app/assets/javascripts/admin.js
View
app/assets/stylesheets/bootstrap_and_overrides.css.less
View
app/controllers/api/v0/base_controller.rb
View
app/controllers/api/v0/statistics_controller.rb
View
app/controllers/application_controller.rb
View
app/controllers/dmptemplates_controller.rb
View
app/controllers/guidance_groups_controller.rb
View
app/controllers/guidances_controller.rb
View
app/controllers/organisations_controller.rb
View
app/controllers/token_permission_types_controller.rb
View
app/controllers/users_controller.rb
View
app/models/exported_plan.rb
View
app/models/guidance_group.rb
View
app/models/organisation.rb
View
app/models/plan.rb
View
app/models/project.rb
View
app/models/question.rb
View
app/models/role.rb
View
app/models/user.rb
View
app/policies/application_policy.rb 0 → 100644
View
app/policies/dmptemplate_policy.rb 0 → 100644
View
app/policies/guidance_group_policy.rb 0 → 100644
View
app/policies/guidance_policy.rb 0 → 100644
View
app/policies/organisation_policy.rb 0 → 100644
View
app/policies/token_permission_type_policy.rb 0 → 100644
View
app/policies/user_policy.rb 0 → 100644
View
app/views/devise/registrations/edit.html.erb
View
app/views/dmptemplates/_admin_nav_tabs.html.erb
View
app/views/dmptemplates/admin_index.html.erb
View
app/views/dmptemplates/export.pdf.erb 0 → 100644
View
app/views/layouts/_dmponline_navigation.html.erb
View
app/views/layouts/_dmponline_org_branding.html.erb
View
app/views/layouts/_dmponline_signin_signout.html.erb
View
app/views/organisations/admin_edit.html.erb
View
app/views/organisations/admin_show.html.erb
View
app/views/plans/_answer_form.html.erb
View
app/views/plans/export.docx.caracal
View
app/views/plans/export.html.erb
View
app/views/plans/export.pdf.erb
View
app/views/projects/_project_details.html.erb
View
app/views/users/admin_grant_permissions.html.erb 0 → 100644
View
app/views/users/admin_index.html.erb
View
config/initializers/dragonfly.rb
View
config/locales/en-UK.yml
View
config/routes.rb
View
db/migrate/20130903123015_create_friendly_id_slugs.rb
View
db/migrate/20140604092907_rails_settings_migration.rb
View
db/schema.rb
View
db/seeds.rb
View
html/ApplicationController.html
View
html/DmptemplatesController.html
View
html/GuidanceGroupsController.html
View
html/GuidancesController.html
View
html/OrganisationUsersController.html
View
html/OrganisationsController.html
View
html/User.html
View
html/js/search_index.js
View
html/table_of_contents.html
View
public/403.html