Граф коммитов

24 Коммитов

Автор SHA1 Сообщение Дата
Jason Robbins 593968b95d
Permit assigned reviewer to vote on reviews. (#3278) 2023-08-25 14:42:07 -07:00
Yann Dago f45f68ab52
Use chromedash-login-required-page for all components that require signin (#3070)
* Use chromedash-login-required-page for all components that require signin
2023-06-09 15:13:12 -04:00
Yann Dago 572397dc87
Restrict release note page access, add help text to enterprise rollout stages (#3003)
* /enterprise/releasenotes is now restricted to @google.com and @chromium.org accounts
* A new help text has been added at the rollout stage for enterprise features
2023-05-11 17:08:03 -04:00
Jason Robbins 52328f8d90
Update werkzeug and stopusing routes with the same path. (#2861) 2023-03-27 13:54:05 -07:00
Daniel Smith d43a0e6aaa
Spec mentors can edit features in which they are listed as a mentor (#2660)
* spec mentors can edit features

* Check that spec_mentor_emails is not null
2023-01-12 12:36:14 -08:00
Daniel Smith d331c4540e
Add new route dataclass (#2456)
* Add new route dataclass

* add blank line
2022-11-09 10:06:59 -08:00
Daniel Smith e2ce1d405e
Use FeatureEntry for most client-side use cases (#2433)
* Use FeatureEntry entity for most client-side uses

* leave notify and amendments to Feature for now

* handle redis keys
2022-11-06 12:57:40 -08:00
Daniel Smith 75b7c85953
default values for some required fields (#2310) 2022-10-10 19:43:40 +02:00
Kuan-Hsuan (Kevin) Shen a9844400b1
Launch the SPA (#2224)
* Launch the SPA

* Remove unused imports

* Address comments

* Avoid pushState when url has already matched
2022-09-13 14:54:32 -04:00
Daniel Smith 9970ec3d7a
Enable new permissions system (#2174)
* enable new permissions

* review changes
2022-08-26 15:30:55 -07:00
Jason Robbins 697cf9b38d
Refactor remaining models.py code into core_models.py (#2160)
* Refactor remaining models.py to core_models.py.

* Move tests to the right _test file.
2022-08-23 16:00:02 -07:00
Jason Robbins 689483c0f3
Refactor user-related models into a separate file. (#2141) 2022-08-17 18:14:19 -07:00
Daniel Smith 8ee81f5d82
Create new creator field for features (#2034)
* add creator field

* cron job to add creator field

* changes suggested by @jrobbins

* add logging
2022-07-20 09:43:19 -07:00
Daniel Smith 83e77b9d5b
New permissions system implementation (#2011)
* Check edit permissions by individual feature

* update logic to check permissions

* editors field added

* editors can see edit access in UI

* myfeatures shows editable features

* Make editor field plural

* 1 more plural update

* change var name for site editor

* Editors can delete a feature

* Site editors can now be designated in admin ui

* fix existing tests to work with new changes

* feature and permissions tests

* accounts and models test

* new creator field

* update tests for creator field

* code cleanup

* add creator field to new feature

* unlisted features are displayed in "My Features"

If the user is the creator, an owner, or an editor.

* slight update in unlisted features logic

* My features displays all editable features

in a single dropdown.

* fix web tests

* add test to ensure creator can edit feature

* remove unused _reject_or_proceed() change

* remove mangle and log statement

* Set original permissions

All changes to permissions.py removed.
This commit can be reverted to enable to new permissions system.

* changes suggested by @jrobbins

* update from merge

* remove creator field for later implementation

* changes suggested by @jrobbins
2022-07-13 14:31:27 -07:00
Jason Robbins f29a2ff916
Avoid needing to run py2 on workstations. (#1734)
* Avoid needing to run py2 on workstations.

* Use gunicorn instead of dev_appserver

* Add comment to explain that dev-default.yaml is not currently used.

* Use venv pip to install py3 deps.

* Auto-activate and stop referencing lib/.

* Make gunicorn use libs in cs-env.
2022-02-15 13:31:27 -08:00
Jason Robbins fe3f910336
In py3 code, replace the separate mock lib with unittest.mock. (#1665) 2022-01-11 08:20:40 -08:00
Kyle Ju b6bb10195a
Run 2to3 to detect py2 to py3 changes (#1551)
* Run 2to3 -w -n .

* Update internals/fetchmetrics.py

* Update internals/models.py

* Update internals/notifier.py

* Update pages/blink_handler.py

* Update internals/fetchmetrics.py
2021-09-22 18:23:14 -07:00
Shivam Agarwal fd6018bd3d
20210618 gae ndb to cloud ndb (#1365)
* Added Cloud NDB to requirements

* google-cloud-core 1.7.0 requires google-auth<2.0dev,>=1.24.0, but you'll have google-auth 1.20.1 which is incompatible.

* Running DataStore Emulator on port 15606 and setting environment variable for the same

* Replaced GAE NDB imports with Cloud NDB imports

* Solved Error: No Context for Ramcache

* Solved No NDB Context Error for Cloud NDB

* Fixed Error No object QueryOptions

* Removed clear_datstore flag

* Fixed to_dict() method

* Added explicit call to method for stashing values while editing a feature

* Using Cloud NDB in testbed

* Updated README with JRE instructions and setting the DJANGO_SETTTINGS_MODULE environment variable for django.setup

* Added Env Variable for datastore emulator

* Migrated accounts_api_test.py

* Migrated approvals_api_test.py

* Migrated Comments.py and Cues_api_test.py

* Migrated Features.py

* Migrated metricsdata_test.py

* Migrated stars_api_test.py

* Fixed Deprecation warning for query options

* Migrated token_refresh_api_test.py

* Migrated basehandlers_test.py

* Migrated permissions_test.py

* Migrated ramcache_test.py

* Migrated secrets_test.py

* Migrated xsrf_test.py

* Migrated fetchmetrics_test.py

* Migrated models_test.py

* Migrated notifier_test.py

* Migrated processes_test.py

* Migrated featuredetail_test.py

* Migrated featurelist_test.py

* Migrated guide_test.py

* Migrated intentpreview_test.py

* Migrated samples_test.py

* Removed some unused stubs

* Set the consistency of datastore emulator to be 1

* Resetting the database emulator before running the tests

* Added npm targets for starting and stopping emulator

* Updated README and Developer Docs

* Removed unused imports

* Made NDB calls DRY
2021-06-28 19:05:04 -07:00
Jason Robbins 0c11c6ca80
Reduce usage of GAE users. (#1355) 2021-06-09 10:35:55 -07:00
Shivam Agarwal 8fbebb7989
20210418 google sign in (#1275)
* Added Google Platform Library

* Added Meta Element for Client ID

* Added Google Sign-In Button

* Authenticating the id_token on our backend

* Saving id_token in flask session, using the id_token to fetch the current user and replaced the usages of AppEngine Users API (not from *_tests.py)

* Correct the flow on pressing SignIn and SignOut

* Code refactor

* Added Comment for is_current_user_admin

* Supporting GAE Users library for post request

* Made some fixes

* Changed Admin User condition

* Reloading only on 200 response code

* Do not require sign in and xsrf token while sending post request for login

* Sign Out using Google Sign In if cookie is not set after login

* Clearing the session if the id_token stored in the session variable becomes invalid or expires

* Replaced GAE Users from tests

* Replaced GAE users with framework users in tests.py
2021-05-06 16:37:30 -07:00
Jason Robbins f4726b7455
Allow site admins to be specified via AppUser entities. (#1288) 2021-04-27 18:56:37 -07:00
Jason Robbins 8b7ab24536
Add entities, perms, and API handlers for approvals. (#1259)
* Add entities, perms, and API handlers for approvals.

* Add cacheing and more tests

* Addressed review comments
2021-04-09 15:43:11 -07:00
Jason Robbins 52e38880b3
Flesh out permissions.py and simplify page logic. (#1237)
* Flesh out permissions.py and simplify page logic.

* Addressed review comments
2021-03-24 10:11:13 -07:00
Jason Robbins 288467837d
Delete code for the legacy feature editing UI. (#1231) 2021-03-23 09:28:46 -07:00