Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Milestone 2.0 - User scope views, Discoverable Groups & Patches #340

Merged
merged 138 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from 134 commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
279a66f
improve usage docs and guides in API swagger
fmigneault Jul 21, 2020
e5229a9
[wip] user info self-update
fmigneault Jul 22, 2020
3408b54
[wip] add /register/groups routes + setup test for user-view function…
fmigneault Jul 23, 2020
7c52da6
db migration for discoverable groups + UI improvements (CSS + error a…
fmigneault Jul 24, 2020
b4b761e
more config auto-setup with MAGPIE_CONFIG_PATH (fix #204, fix #47) + …
fmigneault Jul 25, 2020
d9db945
Update models.py
fmigneault Jul 24, 2020
1e490a4
disable UI non-editable users/groups + error API side (fixes #164)
fmigneault Jul 27, 2020
f327155
force non-default secret/admin-credentials (relates to #229) + update…
fmigneault Jul 28, 2020
3b98cc5
adjust ui theme + address codacy issues (fix #168)
fmigneault Jul 28, 2020
67106ed
ui style changes
fmigneault Jul 28, 2020
6c8864d
avoid reload page on cancel alert + fix add group error value warning
fmigneault Jul 28, 2020
1951d84
ui theme selection & fixes + config doc additions & fixes
fmigneault Jul 29, 2020
8aea835
update history with fix #204
fmigneault Jul 29, 2020
ae5cc5b
fix linting
fmigneault Jul 29, 2020
4a31513
improve UI buttons and icons
fmigneault Jul 29, 2020
33d4c0b
user input validation (fix #84, relates #171) + adjust input types + …
fmigneault Jul 29, 2020
c04754e
unify str formats
fmigneault Jul 29, 2020
e493be0
add version tag in UI + more input validation (#84) + tests
fmigneault Jul 30, 2020
0ce052e
fix typings & linting
fmigneault Jul 30, 2020
2cfe474
better document tests utils and minor fixes to them
fmigneault Jul 30, 2020
a91d452
more test cases and improvements
fmigneault Jul 30, 2020
6a6f111
impl discoverable groups tests
fmigneault Jul 30, 2020
627618c
helper CLI script updates + fixes 'discoverable' default + enforce/bl…
fmigneault Jul 30, 2020
cd0dba2
even more input validation
fmigneault Jul 30, 2020
46e8944
update changelog about fix #47 - user creation from config
fmigneault Jul 30, 2020
aaabe7b
enforce regex validation for any path var & body key from request-che…
fmigneault Jul 30, 2020
2459a43
more tests & update utils
fmigneault Jul 31, 2020
7d7c510
test fixes
fmigneault Jul 31, 2020
eda9c1c
Bump version: 1.11.0 → 2.0.0
fmigneault Jul 31, 2020
66ddc51
test patches + more implementations
fmigneault Jul 31, 2020
c012a82
update CLI tests & references + fixing tests
fmigneault Aug 1, 2020
917e3fc
fix batch-update-user script & tests
fmigneault Aug 3, 2020
7b1cf3d
add user/group effective permission test (fixes #207)
fmigneault Aug 3, 2020
436a209
improve docs + more test fixes
fmigneault Aug 3, 2020
d145c77
test fixes + UI fields for edit group
fmigneault Aug 18, 2020
157451f
change all PUT -> PATCH update methods + fix edit group UI fields
fmigneault Aug 18, 2020
44e76f4
fixes to tests and schema udpates
fmigneault Aug 18, 2020
1bbb4a1
updates to tests and fix discoverable group operations
fmigneault Aug 19, 2020
0bf4bd2
support accept-header/format-query for all responses (fix #194) + add…
fmigneault Aug 20, 2020
fb5d3b1
update changelog and fix swagger generation
fmigneault Aug 20, 2020
79529da
fix format type check for ui frontpage
fmigneault Aug 20, 2020
fd22952
fix login/logout header forwarding during content-type rewrite
fmigneault Aug 20, 2020
919bb3f
fix content-type for some ui-view + fix version position
fmigneault Aug 20, 2020
faab1fb
small adjustment to catch edge-case accept header from ui
fmigneault Aug 20, 2020
a58edce
improve html formatting and fix returned content-type in this case fo…
fmigneault Aug 20, 2020
d287f64
fix forwarded headers
fmigneault Aug 22, 2020
9ebe8d0
fix rebase
fmigneault Aug 20, 2020
3b8df7b
attempt using route factory
fmigneault Aug 19, 2020
4f655d3
testing out user-factory for route-access permission
fmigneault Aug 20, 2020
8165476
apply user-factory to user-routes
fmigneault Aug 20, 2020
0ffb597
get session-user auto-resolve allowed when current/self reference mat…
fmigneault Aug 20, 2020
f4b20af
documentation improvements (relates to #332 and #341)
fmigneault Aug 22, 2020
bf8b06f
remove json2xml for dicttoxml to avoid breaking install
fmigneault Aug 22, 2020
83e1289
make user-factory work for admins when non-existing user is reference…
fmigneault Aug 22, 2020
6d91c9c
finish perms docs + fixes for tests
fmigneault Aug 24, 2020
cd46634
add note about fix #337
fmigneault Aug 24, 2020
4322fba
more validations and test of schemas
fmigneault Aug 25, 2020
8a96ce3
update changelog fix #171 (via commit e493be0)
fmigneault Aug 25, 2020
19908a9
service listing (fix #345) + more response formatting tests
fmigneault Aug 25, 2020
4d2b1bb
add validation on input password missing
fmigneault Aug 25, 2020
fa645a0
more tests and validation checks + increase coverage
fmigneault Aug 25, 2020
87bec12
apply changes for flatten listing (#345) + align with eventual resour…
fmigneault Aug 25, 2020
7bb9b38
obsolete inherited_permissions routes + apply fixes to permissions docs
fmigneault Aug 26, 2020
230eecb
improve docs to use terms, notes, warnings across configuration details
fmigneault Aug 26, 2020
fbee608
add typing and docstring
fmigneault Aug 26, 2020
fc420a8
remove sync-service duplicate code
fmigneault Aug 26, 2020
c572c31
demystify docs about direct/immediate/applied/inherited permissions
fmigneault Aug 26, 2020
a2c5324
fix returned allowed permissions for services/reosources routes + mor…
fmigneault Aug 27, 2020
755a6f9
move resource util where it should be
fmigneault Aug 27, 2020
8096161
fix ui join discoverable group request
fmigneault Aug 27, 2020
708466a
ui return error code of api request
fmigneault Aug 27, 2020
8838e84
fix more tests and results
fmigneault Aug 27, 2020
9222e44
fix admin-user access when view requires MAGPIE_LOGGED_PERMISSION
fmigneault Aug 28, 2020
6976f1e
fixes + password min size check
fmigneault Aug 29, 2020
75fe08a
more fixes + plan extra tests of user services responses
fmigneault Aug 30, 2020
07e51e9
more tests & fixes
fmigneault Aug 30, 2020
f4e15df
more use-case test coverage + corresponding fixes
fmigneault Sep 1, 2020
a30583b
more test fixes
fmigneault Sep 1, 2020
fd42898
filter query user resources + more test cases & fixes
fmigneault Sep 2, 2020
30340fa
fix linting
fmigneault Sep 2, 2020
7083a40
Merge pull request #348 from Ouranosinc/fixes-and-checks
fmigneault Sep 2, 2020
c808f7a
patch sphinx docs version
fmigneault Sep 2, 2020
b3f28fe
remove redundant travis coverage job
fmigneault Sep 2, 2020
3c70263
more logging during database migration to investigate error
fmigneault Sep 2, 2020
930cd21
use low-level ziggurat models to avoid missing future fields definiti…
fmigneault Sep 2, 2020
c9a9084
make non-editable groups displayed as such in ui
fmigneault Sep 3, 2020
b6560e0
adjust migration script to base sql call to avoid future field errors…
fmigneault Sep 3, 2020
f0e4ed4
fix lint
fmigneault Sep 3, 2020
747b7a9
ui display & test typing fixes
fmigneault Sep 3, 2020
14c6786
avoid tests assuming test-admin user already exists
fmigneault Sep 3, 2020
e9df61c
fix enum future python 3.8 error
fmigneault Sep 3, 2020
568305c
use travis venv python to target good pip + skip reinstall conda/python
fmigneault Sep 3, 2020
aacddf1
other enum future python 3.8 fix
fmigneault Sep 3, 2020
b49dd6f
travis patches
fmigneault Sep 3, 2020
c6bf643
add supported python versions in setup & travis
fmigneault Sep 3, 2020
8b2ef51
fix active env resolution
fmigneault Sep 3, 2020
918dc31
pin pylint until const iterable with enum fixed (PyCQA/astroid#713)
fmigneault Sep 3, 2020
4bd4bfc
fix failing tests
fmigneault Sep 3, 2020
df49bbe
other attempt to make test run with venv
fmigneault Sep 4, 2020
10222cc
adjust travis export + fix test path
fmigneault Sep 4, 2020
386a1d7
adjust requirements for backward compatibility
fmigneault Sep 4, 2020
3db1dda
adjust docs requirement
fmigneault Sep 4, 2020
ff701e3
bw compat
fmigneault Sep 4, 2020
03af046
patch doc link to permisisons
fmigneault Sep 4, 2020
af877b2
Merge pull request #351 from Ouranosinc/doc-patches
fmigneault Sep 4, 2020
acdacca
patch invalid postgres.env created using magpie.env.example
fmigneault Sep 10, 2020
74369bc
avoid issue of database_exists check (introduced by kvesteri/sqlalche…
fmigneault Sep 10, 2020
3500436
extra docs according to PR feedback
fmigneault Sep 10, 2020
dcfc1bb
adjust handling of UI group discoverable checkbox
fmigneault Sep 10, 2020
fa93eb9
adjust default view decorator to wrap/redirect to error view all UI e…
fmigneault Sep 10, 2020
fc9439a
override param error details when not verbose
fmigneault Sep 10, 2020
172b199
fix UI button theme for add-resource + patches with param TWITCHER_HOST
fmigneault Sep 10, 2020
e64159a
add more generic ui checks for bad-request returned by api create use…
fmigneault Sep 10, 2020
0b7e5d0
fix spelling & security check
fmigneault Sep 10, 2020
b038ad8
update ui styles for better disabled vs cancel distinction
fmigneault Sep 10, 2020
308c1c8
fix package verison extraction in setup
fmigneault Sep 11, 2020
b95b9e4
add contextual user docs + patch context user resolution when unauthe…
fmigneault Sep 11, 2020
3cd4f7f
lint doc fix
fmigneault Sep 11, 2020
da16a7a
add test for no-auth user accessing other user details
fmigneault Sep 11, 2020
ba034d1
fix missing service type when none registered
fmigneault Sep 11, 2020
17b5423
fix backward compat of curl command message
fmigneault Sep 11, 2020
0c35953
patch test cookies
fmigneault Sep 11, 2020
59c534a
backward compat
fmigneault Sep 11, 2020
f41ea3f
improve typing + fix py2 bwcompat args by removing internal arg to fu…
fmigneault Sep 12, 2020
19cb344
default disable feature to push service updates to phoenix
fmigneault Sep 12, 2020
117b4a4
fix backport tempdir unittest
fmigneault Sep 12, 2020
a9711ef
fix bad requirement definition
fmigneault Sep 13, 2020
b101a99
python 2.7 & python 3.5 support notes
fmigneault Sep 14, 2020
e82e176
adjust pip install sys
fmigneault Sep 14, 2020
64b19ee
remove pip use-feature-2020-resolver breaking a lot
fmigneault Sep 14, 2020
c9b423a
re-add pip 2020-resolver + remove typing install in python 3
fmigneault Sep 14, 2020
ca06122
update linters to Python 3.7 with fixes to latest pylint & isort
fmigneault Sep 14, 2020
9a8f2f9
adjust docker image of adapter with python3 as base magpie
fmigneault Sep 14, 2020
d85347a
patch warning symbol on remove service
fmigneault Sep 14, 2020
fb52181
adjust compare validation
fmigneault Sep 15, 2020
4f9cb8c
patch extended enum impl to allow deepcopy (pickle)
fmigneault Sep 15, 2020
fa30df9
correctly ignore generated doc by autoapi + patch lint
fmigneault Sep 15, 2020
de0fe0e
update account-user page with immediate warning invalid field
fmigneault Sep 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
api:
- magpie/api/**/*

cli:
- magpie/cli/**/*

# label 'ci' all automation-related steps and files
ci:
- .* # all '.<>' files
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ magpie/include
magpie/lib
magpie/local
magpie/ui/swagger-ui/magpie-rest-api.json
magpie_create_users*.txt
magpie_delete_users*.txt
requirements-all.txt
gunicorn.app.wsgiapp
error_log.txt
17 changes: 13 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,16 @@ disable=C0111,missing-docstring,
R0915,too-many-statements,
R1710,inconsistent-return-statements,
R1721,unnecessary-comprehension,
R1725,super-with-arguments,
W0108,unnecessary-lambda,
W0143,comparison-with-callable,
W0232,no-init,
W0235,useless-super-delegation,
W0613,unused-argument,
W0640,cell-var-from-loop,
W0703,broad-except,
W0706,try-except-raise,
W0707,raise-missing-from,
W1508,invalid-envvar-default

# note: following errors are managed via isort tool, ignore false positives
Expand All @@ -93,7 +96,10 @@ disable=C0111,missing-docstring,
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
enable=
c-extension-no-member
W0122
W0123


[REPORTS]
Expand Down Expand Up @@ -130,7 +136,10 @@ max-nested-blocks=5
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit
never-returning-functions=
sys.exit
magpie.utils.raise_log
magpie.api.exception.raise_http


[TYPECHECK]
Expand Down Expand Up @@ -365,7 +374,7 @@ function-naming-style=snake_case
#function-rgx=

# Good variable names which should always be accepted, separated by a comma.
good-names=i,j,k,v,ex,x,y,z,f,h,db,kw,ns,_
good-names=i,j,k,v,ex,x,y,z,f,fd,h,db,kw,ns,qs,_

# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
Expand Down Expand Up @@ -461,7 +470,7 @@ valid-metaclass-classmethod-first-arg=cls

# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
allow-any-import-level=magpie

# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
Expand Down
49 changes: 24 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,21 @@ dist: xenial
os:
- linux
python:
- "3.6"
- "3.5"
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
cache:
- pip
- directories:
- $HOME/conda
- $HOME/downloads
# includes PR when base branch = master
if: branch = master OR tag IS present
env:
global:
- CONDA_HOME=$HOME/conda
- DOWNLOAD_CACHE=$HOME/downloads
- secure: lzPPXuRTlqLHl2MCAUuy7ROrewSwPFGGKqbADo7npQ4jqVMAb/TQ5PTzIi4IAIvsv817dNj5WSAd39hsp1zSlE1R2jLtbxGEVqwcjTqSv9VStGascRQnCW1hcoSKYqESweEhtdIcH+uXpV8qnDsUWB6YIIP2VjgWPMfSPZPynFKC0IqZm2sFsqDEJJHr3QM5iN3i3Z9GrEIrBEEpoaf0yak5u8LjqoGSaY8ISPGWipBJYn7i/r/+sZpirFXbZRJmI4ljsaHi0tysNWdANOIf7S2+Dy/oGNn/3Br0OMJ5snFe/n6Uf4GcmPGDc1c86oN0FpGcoNSA+lCUPMASghOGwVqBhMjX+qAZZfzEbCGtr2j/MhcpETMO3S9oqelw4CcbZRXxP2Y20L+KGNOCSt3SC4/HdKj5MWRQGUnIZbT9C2Tpn2wTffpVRoKvhik/6UU8/KT12LSwDhjjrfqLgCEFLqH1nBL2Mopkj/eOwQbZ66nZmthrAF7/c+vaB38LWoqBIZi/fOwo6+kt947d1bW6UX6Z1KnCNLN2KO064Hjn+SHb1gAes0JIXIZE7af1Gti2dKmUL4a5eoYyU5vCLlp2nq5yxEtTUdJKZ1UVnkDqRtSaT0F3FgLypbFqi+qZ6AtygxKqplMjeAGhvVSqZTPqRupP1ac/KBBCvMzG8pkfXWs=
jobs:
- TEST_TARGET=test-local START_TARGET=
- TEST_TARGET=test-remote START_TARGET=start
- TEST_TARGET=coverage START_TARGET=
addons:
postgresql: "9.6"
services:
Expand All @@ -37,18 +33,20 @@ notifications:
email: false
# === pipeline ===
before_install:
# obtain details about environment
- python -V
- uname -a
- lsb_release -a
- export PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
- export CONDA_ENV=magpie-${TRAVIS_PYTHON_VERSION}
- export CONDA_PREFIX=$HOME/conda/envs/magpie-${TRAVIS_PYTHON_VERSION}
- export PATH=${CONDA_HOME}/bin:$PATH
- hash -r
- env
- make conda-base
# fake conda paths to employ preinstalled virtualenv python
- export CONDA_ENV_NAME=python${TRAVIS_PYTHON_VERSION}
- export CONDA_ENVS_DIR=${HOME}/virtualenv
- export CONDA_PREFIX=${CONDA_ENVS_DIR}/${CONDA_ENV_NAME}
- export CONDA_ENV_PATH=${CONDA_PREFIX}
- env | sort
- make info
- make install-sys
#==== magpie env and constants ===
# load magpie env and constants
- mkdir -p ./env
- cp -f ./ci/magpie.env ./env/magpie.env
install:
Expand All @@ -59,38 +57,39 @@ before_script:
- psql -c 'create database magpie;' -U postgres
- echo ${CONDA_PREFIX}
- echo ${CONDA_ENV}
- export PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}
- export CONDA_ENV=magpie-${TRAVIS_PYTHON_VERSION}
- export CONDA_PREFIX=${HOME}/conda/envs/magpie-${TRAVIS_PYTHON_VERSION}
- export PATH=${CONDA_HOME}/bin:${PATH}
- source ./env/magpie.env
- hash -r
- env
- env | sort
stages:
- check # run linting checks and don't bother with the rest if invalid
- test # use default stage to run job matrix variations
- smoke-test # try running the built/packaged docker image
jobs:
allow_failures:
# leave versions while they remains easy to maintain
- python: "2.7" # deprecated support (January 2020)
- python: "3.5" # deprecated support (September 2020)
include:
# use stages to quick fail faster tests
# these are extra to default 'test' stage with auto-matrix/env extension
- stage: check
name: "Linter Checks"
python: "3.6"
python: "3.7"
os: linux
script: make check
- stage: check
name: "Documentation Check" # verify that build works
python: "3.6"
python: "3.7"
os: linux
script: make docs
- stage: test
name: "Coverage"
python: "3.6"
python: "3.7"
os: linux
script: make coverage
- stage: smoke-test
name: "Smoke Test"
python: "3.6"
python: "3.7"
os: linux
script: make test-docker
script:
Expand All @@ -101,4 +100,4 @@ script:
after_success:
# coverage report
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
- source ${CONDA_PREFIX}/bin/activate ${CONDA_ENV} && python-codacy-coverage -r reports/coverage.xml
- source ${VIRTUAL_ENV}/bin/activate && python-codacy-coverage -r reports/coverage.xml
95 changes: 91 additions & 4 deletions HISTORY.rst → CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,100 @@
.. explicit references must be used in this file (not references.rst) to ensure they are directly rendered on Github
.. :changelog:

History
=======
Changes
*******

`Unreleased <https://github.com/Ouranosinc/Magpie/tree/master>`_ (latest)
------------------------------------------------------------------------------------

* Nothing yet.

`2.0.0 <https://github.com/Ouranosinc/Magpie/tree/2.0.0>`_ (2020-07-31)
------------------------------------------------------------------------------------

Features / Changes
~~~~~~~~~~~~~~~~~~~~~
* Add ``/ui`` route redirect to frontpage when UI is enabled.
* Add ``/json`` route information into generated Swagger API documentation.
* Add tag description into generated Swagger API documentation.
* Add more usage details to start `Magpie` web application in documentation.
* Add database migration for new ``discoverable`` column of groups.
* Allow logged user to update its own information both via API and UI
(relates to `#170 <https://github.com/Ouranosinc/Magpie/issues/170>`_).
* Allow logged user of any access-level to register by itself to ``discoverable`` groups.
* Change some UI CSS for certain pages to improve table readability.
* Add UI page to render error details from API responses (instead of default server-side HTML error rendering).
* Add ``MAGPIE_UI_THEME`` with new default *blue* theme and legacy *green* theme (with few improvements).
* Add more validation and inputs parameters to update ``Group`` information.
* Add UI input fields to allow administrator to update group description and group discoverability.
* Allow combined configuration files (``providers``, ``permissions``, ``users`` and ``groups`` sections) with
resolution of inter-references between them. File can be specified with ``MAGPIE_CONFIG_PATH`` environment variable
or ``magpie.config_path`` setting (example in ``configs``).
* Add configurable ``User`` creation parameters upon `Magpie` application startup through configuration files
(fixes `#47 <https://github.com/Ouranosinc/Magpie/issues/47>`_ and
`#204 <https://github.com/Ouranosinc/Magpie/issues/204>`_).
* Add disabled checkboxes for UI rendering of non-editable items to avoid user doing operations that will always be
blocked by corresponding API validation (relates to `#164 <https://github.com/Ouranosinc/Magpie/issues/164>`_).
* Add more tests to validate forbidden operations such as update or delete of reserved ``User`` and ``Group`` details.
* Add active version tag at bottom of UI pages (same version as returned by API ``/version`` route).
* Enforce configuration parameters ``MAGPIE_SECRET``, ``MAGPIE_ADMIN_USER`` and ``MAGPIE_ADMIN_PASSWORD`` by explicitly
defined values (either by environment variable or INI settings) to avoid using defaults for security purposes.
* Change CLI helper ``create_users`` to ``batch_update_users`` to better represent provided functionalities.
* Change CLI helper ``register_default_users`` to ``register_defaults`` to avoid confusion on groups also created.
* Extend CLI ``batch_update_users`` functionality with additional options and corresponding tests.
* Move all CLI helpers under ``magpie.cli`` and provide more details about them in documentation.
* Allow unspecified ``group_name`` during user creation request to employ ``MAGPIE_ANONYMOUS_GROUP`` by default
(i.e.: created user will have no other apparent group membership since it is always attributed for public access).
* Change all ``PUT`` requests to ``PATCH`` to better reflect their actual behaviour according to RESTful best practices
(partial field updates instead of complete resource replacement and conflict responses on duplicate identifiers).
* Add support of ``Accept`` header and ``format`` query parameter for all API responses, for content-types variations
in either plain text, HTML, XML or JSON (default), and include applicable values in schemas for Swagger generation.
* Add support of new response content-type as XML (must request using ``Accept`` header or ``format`` query parameter).
* Add documentation details about different types of ``Permission``, interaction between various `Magpie` models,
glossary and other general improvements (relates to `#332 <https://github.com/Ouranosinc/Magpie/issues/332>`_ and
`#341 <https://github.com/Ouranosinc/Magpie/issues/341>`_).
* Add alternative response format for service and service-type paths using ``flatten`` query parameter to obtain a flat
list of services instead of nested dictionaries (fixes `#345 <https://github.com/Ouranosinc/Magpie/issues/345>`_).
* Change pre-existing ``list`` query parameter of user-scoped views to ``flatten`` response format to match new query
of service-scoped views.
* Add ``filtered`` query parameter for user-scoped resources permission listing when request user is an administrator.
* Obsolete all API routes using ``inherited_permission`` format (deprecated since ``0.7.4``) in favor of equivalent
``permissions?inherited=true`` query parameter modifier.
* Replace ``inherit`` query parameter wherever applicable by ``inherited`` to match documentation names, but preserve
backward compatibility support of old name.
* Add ``MAGPIE_PASSWORD_MIN_LENGTH`` setting with corresponding validation of field during ``User`` creation and update.
* Avoid returning ``Service`` entries where user, group or both (according to request path and query options) does not
actually have any permission set either directly on them or onto one of their respective children ``Resource``. This
avoids unnecessarily exposing all ``Service`` for which the user cannot (or should not) be interacting with anyway.
* Add ``TWITCHER_HOST`` as alternative configuration parameter to define the service public URL, to have a similar
naming convention as other use cases covered by ``MAGPIE_HOST`` and ``PHOENIX_HOST``.
* Modify ``PHOENIX_PUSH`` to be *disabled* by default to be consistent across all locations where corresponding
feature is referenced (startup registration, CLI utility, API requests and UI checkbox option) and because this
option is an advanced extension not to be considered as default behavior.
* Python 2.7 and Python 3.5 marked for deprecation (they remain in CI, but are not required to pass), as both
reached their EOL as of January/September 2020.

Bug Fixes
~~~~~~~~~~~~~~~~~~~~~
* Fix invalid API documentation of request body for ``POST /users/{user_name}/groups``.
* Fix `#164 <https://github.com/Ouranosinc/Magpie/issues/164>`_ (forbid *special* users and groups update and delete).
* Fix `#84 <https://github.com/Ouranosinc/Magpie/issues/84>`_ and
`#171 <https://github.com/Ouranosinc/Magpie/issues/171>`_ with additional input validation.
* Fix `#194 <https://github.com/Ouranosinc/Magpie/issues/194>`_ to render API error responses according to content-type.
* Fix `#337 <https://github.com/Ouranosinc/Magpie/issues/337>`_ documentation mismatch with previously denied request
users since they are now allowed to run these requests with new user-scoped functionalities
(`#340 <https://github.com/Ouranosinc/Magpie/issues/340>`_).
* Fix bug introduced in `0.9.4 <https://github.com/Ouranosinc/Magpie/tree/0.9.4>`_
(`4a23a49 <https://github.com/Ouranosinc/Magpie/commit/4a23a497e3ce1dc39ccaf31ba1857fc199d399db>`_) where some
API routes would not return the `Allowed Permissions` for children ``Resource`` under ``Service``
(only ``Service`` permissions would be filled), or when requesting ``Resource`` details directly.
* Fix input check to avoid situations where updating ``Resource`` name could cause involuntary duplicate errors.
* Fix minor HTML issues in mako templates.
* Fix invalid generation of default ``postgres.env`` file from ``magpie.env.example``.
File ``postgres.env.example`` will now be correctly employed as documented.
* Make environment variable ``PHOENIX_PUSH`` refer to ``phoenix.push`` instead of ``magpie.phoenix_push`` to employ
same naming schema as all other variables.

`1.11.0 <https://github.com/Ouranosinc/Magpie/tree/1.11.0>`_ (2020-06-19)
------------------------------------------------------------------------------------

Expand Down Expand Up @@ -213,14 +300,14 @@ Bug Fixes

Bug Fixes
~~~~~~~~~~~~~~~~~~~~~
* Fix a bug in ows_parser_factory that caused query parameters for wps services to be case sensitive.
* Fix a bug in ``ows_parser_factory`` that caused query parameters for wps services to be case sensitive.

`1.6.1 <https://github.com/Ouranosinc/Magpie/tree/1.6.1>`_ (2019-10-01)
------------------------------------------------------------------------------------

Bug Fixes
~~~~~~~~~~~~~~~~~~~~~
* Fix migration script for project-api service type.
* Fix migration script for ``project-api`` service type.

`1.6.0 <https://github.com/Ouranosinc/Magpie/tree/1.6.0>`_ (2019-09-20)
------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Before you submit a pull request, check that it meets these guidelines:
1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in `history`_ (under relevant category of section `Unreleased`).
feature to the list in `changes`_ (under relevant category of section `Unreleased`).
3. The tests should work for the specified version of Python for this project.


Expand All @@ -93,6 +93,6 @@ To run a subset of tests::

.. References for this page
.. _new issue: https://github.com/Ouranosinc/Magpie/issues/new
.. _history: HISTORY.rst
.. _changes: CHANGES.rst
.. _installation: docs/installation.rst
.. _utilities: docs/utilities.rst
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN chmod 0644 $CRON_DIR/magpie-cron

# install dependencies
COPY magpie/__init__.py magpie/__meta__.py $MAGPIE_DIR/magpie/
COPY requirements* setup.py README.rst HISTORY.rst $MAGPIE_DIR/
COPY requirements* setup.py README.rst CHANGES.rst $MAGPIE_DIR/
RUN apk update \
&& apk add \
bash \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.adapter
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ LABEL Vendor="CRIM"

ENV MAGPIE_DIR=/opt/local/src/magpie
COPY magpie/__init__.py magpie/__meta__.py $MAGPIE_DIR/magpie/
COPY requirements* setup.py README.rst HISTORY.rst $MAGPIE_DIR/
COPY requirements* setup.py README.rst CHANGES.rst $MAGPIE_DIR/

# install dependencies used by Magpie
RUN apk update \
Expand All @@ -23,7 +23,7 @@ RUN apk update \
supervisor \
gcc \
libffi-dev \
python-dev \
python3-dev \
musl-dev \
postgresql-dev \
&& pip install --no-cache-dir --upgrade pip setuptools \
Expand Down
Loading