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

feat: add admin disable functionality #456

Merged
merged 5 commits into from
Sep 20, 2023
Merged

feat: add admin disable functionality #456

merged 5 commits into from
Sep 20, 2023

Conversation

Mubangizi
Copy link
Collaborator

@Mubangizi Mubangizi commented Sep 19, 2023

Description

This prevents users from enabling projects or applications or databases that have been disabled by an admin

Trello Ticket ID

Link here

How Can This Be Tested?

Login as an admin, disable a project or application or database then try to enable it as a normal user.

@Mubangizi Mubangizi enabled auto-merge (squash) September 20, 2023 08:24
Copy link
Collaborator

@MutegekiHenry MutegekiHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mubangizi Mubangizi merged commit 57cbca5 into develop Sep 20, 2023
4 checks passed
@Mubangizi Mubangizi deleted the ft-admin-disable branch September 20, 2023 09:14
Mubangizi added a commit that referenced this pull request Oct 18, 2023
* add update cotroller fnction

* getting new changes from this branch

* Able to update App information

* Able to update  services and env variables

* Finish all project update fields

* Remove project_id field from api docs

* Remove duplicate user project app route

* Increase token expiry time

* Backend resource cleanup for removing organisations, orgnisation_members and organisation_admins

* Add github authentication route

* change route from github_auth to oauth

* remove linter changes

* Fix dependency issue

* remove pycrypt dependency

* Add linting

* handle null email

* fix null git name issue

* feat: add db stats

* refactor: improve effeciency by reducing loops

* feat: add cluster count stats metadata

* feat: add summary status stats to deployments

* Add env variables and command to app detail info

* Add new user graph data

* feat: create graph data for apps

* refactor graph method implementation

* change graph method to class method

* Remove old configs (#261)

* Add organisation and project_type to project

* Enhancements (#263)

* edit config to source db variables from env

* add small nits to README file

* add updates to README, source variables in config file

* revert and only keep READme changes

* env alternative from .env in config

* edit READMe

* small nit

* feat: tag beta users (#265)

* feat: tag beta users

* correct typo

* Update app creation controllers (#266)

* update app schema fields

* update app creation controller, appschema

* update api docs

* update documentation

* Fix circleci build (#268)

* fix database password creation error

* edit circleci config

* small nit for perm

* update app update ingress rules (#269)

* add custom domain field to app model (#270)

* Let Apps and projects get deleted if the cluster doesnot exist (#271)

* Revert from custom domain to cc domain (#272)

* add revert custom domain endpoint

* Add revert url route

* remove redundant print statement

* remove duplication

Co-authored-by: mubangizi <mubangizia22@gmail.com>

* update app has custom domain status, update api docs, routes (#273)

* Add Authorization to roles endpoints (#277)

* Setup Pytest (#278)

* add pytest fixtures

* clean up test and report job

* add database fixture, functional tests

* Fix app update bug (#279)

* Add custom domain validation

* Add functionality to retrieve evn failed apps

* Remove custom domain commented code

* Add beta user check on app creation and up update

* Fix celery version issue (#283)

* bump celery requirement

* celery version

* GitHub workflow run tests and linter (#280)

* run tests and linter before pushing changes to repository

* skip linting

* clean versions

* remove redundant flake 8 requirement

* add warnings flag to workflow

* modify pytest run command

* delete redundant file

* define env in workflow

* edit app config name

* Add admin custom db route

* Extend database models(Billing) (#285)

* - add billing invoice model

* - add billing metrics model

* - add user payment details model

* - billing invoice schema

* - add models to manager module

* - update migrations with chnages

* CI/CD Revamp (#286)

* Test workflow should run on all pushes and PRs.

* Add staging workflow

* Add staging values file.

* Fix action reference.

* Remove not yet defined action.

* Specify namespace on rollout status.

* Remove circleci config.

* Restrict branch

* refactor: remove db status check on admin endpoint for retrieving all dbs

* Store transaction record on success (#287)

* - create transaction model and register in manage
module

* add transaction record schema

* add migrations

* - add transaction record endpoint

* - update api docs

* - register controller

* - register transaction route

* - small shema refactor

* add date created field

* - add date created field

* Add production workflows. (#289)

* Show user transactions and transaction detail (#291)

* - add user transactions view

* - add user transaction api docs

* - add transaction record detail

* - add route

* - add docs

* - update api docs

* - modify routes

* - refactor transactions endpoint

* - extend project model

* - extend model

* - update schema

* - update migrations

* fix failing post transcation route (#293)

* update transaction status (#294)

* Add billing cost endpoint (#292)

* Fix Migrations. (#295)

* Remove problematic migration(08246b2fe16f)

* Remove problematic migration(f4f92e)

* Update down_revision

* Create 011c3345849a_.py

* Add the prometheus url to a cluster (#296)

* Attach prometheus to cluster model

* Remove unused import

* Update kubernetes version and fix Ingress (#297)

* Update kubernetes version

* Remove unwanted migrations

* Add Celery to requirements.txt

* Fix app update route (#300)

* Client Invoice Integration (#298)

* - billing invoice endpoint pseudocode

* ft: create send invoice email functionality

* refactor invoice email

* - add live data integration for invoice

* - small nits

* - model change

* auto date cashed

* migrations

* Fix failing import and migration

* update html

* migration update

* schema and project model update

* - generate receipts and new invoices

Co-authored-by: MutegekiHenry <henrymutegeki117@gmail.com>
Co-authored-by: mubangizi <mubangizia22@gmail.com>

* Add string checker for app url on revert app url route (#301)

* refactor:add date to transcation payload (#303)

* Ft invoice details (#302)

* small nit

* get billing invoices list

* document endpoint

* add invoice detail view

* document invoice detail view

* - handle edge cases

* Added content to invoice email and gave the table more padding to give items more space for readability (#304)

* update staging variables, circleci migration (#307)

* update staging variables, circleci migration

* - delete circleci directory

* Get Receipt details (#306)

* small nit

* get billing invoices list

* document endpoint

* add invoice detail view

* document invoice detail view

* - handle edge cases

* - add receipts schema

* - receipts detail api

* - add routes and api docs

* - clean up

* small refactor

* add date field

* Ft add monitoring modules (#305)

* Add clusters statuses

* Add clusters statuses

* Add prometheus status

* Add database statuses

* Add cranecloud apps status

* Add mira status

* Remove auth

* On the invoice, formatted date for more readability and also added currency symbol to the amount. (#308)

* Change invoice email to include invoice id, remove project id and add change name label to user name (#311)

* Add cost modal url to cluster (#309)

* Add cost modal url to cluster

* Remove commented urls

* add credits models (#312)

* add credits models

* update model rlshp

* Fix failed test

Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>

* ft: add credits to user object on fetch all users (#313)

Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>

* created controllers and endpoints for credits (#314)

* retrieve user credit record (#315)

Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>

* added endpoint to get a users credit records (#316)

* Add trailing Invoice notifications (#317)

* Add user notification

* Fix invoice quering logic

* Remove comments

* Remmove unnecessary characters from db password (#318)

* Project cost values(Kubecost) (#319)

* - use kubecost data on billing invoice

* better edge case handling

* refactor

* add payments with credits (#321)

* add name to the user object on login (#322)

Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>

* Add ugx value to billing info (#324)

* Add Celery task for sending user invoices

* added feature to send email to user on assignment (#326)

* Ft refactor friendly invoice (#323)

* Made invoice id readable and in the format CCYY-a1b2c3d4e

* Made requested changes

* Delete 4bd21f73a577_.py

Was not supposed to be pushed

* added changes to email notification (#328)

* Added feater for credits expiration with celery (#331)

* Added feater for credits expiration with celery

* added change from pull request

* added change from pull request

* Added scheduler for notification of credits expiration (#333)

* Added feature where credits now expire based on usage as well (#334)

* Add project collaboration (#339)

* Create project users CRUD

* Change to use user emails instead of user ids

* Add Permissions to Projects, Apps and databases

* Add user project transfer

* Fix permissions checker function

* add owner role at project creation

* Separated promotional credits from purchased credits (#337)

* Separated promotional credits from purchased credits

* update celery scheduler to midnight

* Fix staging build (#340)

* add a celery version

* alter celery version

* fix conflicting ranges

* specify celery version

* refactor celery instance name

* introduce absolute imports

* absolute import at celery init

* move future import to file beginning

* remove future imports

* add importlib-metadata

* cleanup

* Fix migrations (#345)

* fix db uri

* edit down revision to avoid conflict

* Refactor promotional and purchased credits (#346)

* fix db uri

* edit down revision to avoid conflict

* new migration for purchased and promotion credit name change

* refactor purchase, promotion credit names

* Fix migrations (#347)

* fix db uri

* edit down revision to avoid conflict

* new migration for purchased and promotion credit name change

* refactor purchase, promotion credit names

* makes fields nullable

* small refactor db name

* migration revision for nullable field

* make fields nullable

* delete redundant migration

* add branch deployment

* revert changes

* make columns nullable

* remove temporary deplyment branch

* Ft update links (#348)

* Updated links to dashboard for credit expiry and credit assignment email notifications

* updated link in credit_expiration

* Ft notify user to project (#349)

* notifications to users for role on projects

* revert change

* changed spelling email notification

* Add user login and creation tests (#350)

* Add user login and creation tests

* add postgres db service to github actions

* revert to investigate test run

* test run with db service

* test db uri variable

* db url parsing

* formatting

* configure jwt secret

* remove jwt secret config

* comment out failing tests to test work flow

* add test db env variables

* test deployment after tests

* remove test deployment branch

Co-authored-by: e-ian <ianemma70@gmail.com>

* credit purchase transaction (#351)

* Setup logging (#354)

* add pymongo requirement

* add mongo connection client and document helper function

* time helper function

* apply to project function

* add requirements

* test deploy

* fix pymongo version

* downgrade zipp requirement

* back roll deployment from pull request

* test to deploy

* roll back staging deployment test

* Remove azure/helm-setup action.

* test staging deployment

* roll back test staging deployment

Co-authored-by: Innocent Asiimwe <asiimwe@outlook.com>

* Add user tests (#353)

* Add user login and creation tests

* add postgres db service to github actions

* revert to investigate test run

* test run with db service

* test db uri variable

* db url parsing

* formatting

* configure jwt secret

* remove jwt secret config

* comment out failing tests to test work flow

* add test db env variables

* test deployment after tests

* remove test deployment branch

* Add user tests

* add secrets to conftest

* small refactor

* test deployment on staging

* abstract test secret

* set app test secret in config

* revert testing config changes

* hard code testing secret

* roll back staging deploy on branch

Co-authored-by: e-ian <ianemma70@gmail.com>

* Adding tests for credit assignments endpoint (#356)

* Adding tests for credit assignments endpoint

* remove unused init file

* added more tests

* Configure test report (#359)

* add coverage requirement

* add test report generation to pipeline

* update test coverage badge

* integrate pull request report

* test staging deploy

* test build badge

* adding staging build badge

* roll back staging test deploy

* Create logger function (#355)

* Add logger function

* Add default value for MONGO_URL

* Remove action calls from project controller

Co-authored-by: mubangizi <mubangizi22@gmail.com>

* Fix build workflow (#364)

* fix build version and test deploy

* revert staging test build

* ft user collaboration: handle anonymous users invitations (#357)

* ft user collaboration: handle anonymous users invitations

* Adding tests for credit assignments endpoint (#356)

* Adding tests for credit assignments endpoint

* remove unused init file

* added more tests

* work on pr feedback: reformat email

* Configure test report (#359)

* add coverage requirement

* add test report generation to pipeline

* update test coverage badge

* integrate pull request report

* test staging deploy

* test build badge

* adding staging build badge

* roll back staging test deploy

* ft user collaboration: handle anonymous users invitations

* work on pr feedback: reformat email

* Create logger function (#355)

* Add logger function

* Add default value for MONGO_URL

* Remove action calls from project controller

Co-authored-by: mubangizi <mubangizi22@gmail.com>

* add extra checks on transitioning anonymous user to real user

* fix failing tests: add missing package

* Fix build workflow (#364)

* fix build version and test deploy

* revert staging test build

* ft user collaboration: handle anonymous users invitations

* work on pr feedback: reformat email

* ft user collaboration: handle anonymous users invitations

* rebase develop-new

* add extra checks on transitioning anonymous user to real user

Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>
Co-authored-by: bashaashma <bashaashma@gmail.com>
Co-authored-by: e-ian <36891299+e-ian@users.noreply.github.com>
Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>
Co-authored-by: mubangizi <mubangizi22@gmail.com>

* implemented user activities logs (#362)

* implemented user activities logs

* Fix build workflow (#364) (#366)

* fix build version and test deploy

* revert staging test build

Co-authored-by: e-ian <36891299+e-ian@users.noreply.github.com>

* fix merge conflict

* fix conflict

Co-authored-by: e-ian <36891299+e-ian@users.noreply.github.com>

* Check and validate flutter-wave payment status (#358)

* document endpoint using swagger

* add python flutterwave requirement

* implement payment verification logic

* register route

* downgrade python flutterwave version

* add python 3.8 to test pipeline

* test staging deployment

* update api docs with query params

* remove build check

* remove python flutterwave requirement add rave python

* check for build versions in matrix

* Add rave python logic

* edit route

* handle exception

* test staging build

* revert test deploy

* - add stable python build version

* update image runner version

* test deploy

* revert changes

* remove redundant pymongo

* feat: add accept or decline collaboration invite (#367)

Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>

* Add App Revision feature (#368)

* Add App revision list

* Able to revert apps

* Add update replicas for app revisions

* Add admin authorisation to revise app (#370)

* Add mongo to Docker Compose (#375)

* Add mongo service to dockercompose

* Add mongo db to docker compose

* Fix deployment workflows. (#376)

* Update staging workflow

* Update prod workflow

* Fix deploy workflow (For real 😄 ) (#377)

* specify zone

* Fix typo

* Use zone for location.

* fix deploy workflow

* fix user activity logs (#374)

* fix user activity logs

* fix actvity logs mongodb uri

* changes to yml

* Add Mongo URI to staging and prod configs (#380)

* Ft remove anonymoususers &  multi-project invites for anonymous user (#373)

* add delete for anonymous users

* allow for multiple project invites of anonymous user

* Add mongo to Docker Compose (#375)

* Add mongo service to dockercompose

* Add mongo db to docker compose

* Fix deployment workflows. (#376)

* Update staging workflow

* Update prod workflow

* Fix deploy workflow (For real 😄 ) (#377)

* specify zone

* Fix typo

* Use zone for location.

* fix deploy workflow

* fix user activity logs (#374)

* fix user activity logs

* fix actvity logs mongodb uri

* changes to yml

* add delete for anonymous users

* allow for multiple project invites of anonymous user

Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>
Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>
Co-authored-by: Innocent Asiimwe <asiimwe@outlook.com>
Co-authored-by: bashaashma <bashaashma@gmail.com>

* Upgrade Backend packages (#379)

* upgrade packages

* revert pyjwt requirement

* test build deploy

* revert test deploy

* increase rollout timeout

* test and deploy

* revert timeout time

* revert build deploy

* Ft increase logger coverage (#381)

* Add activity logger to App CRUD operations

* Add activity logger to database C.U.D operations

* Make log activity asynchronous

* Add test database uri

* Add default database to mongo client

* Ready for Production (#290) (#385)

* add update cotroller fnction

* getting new changes from this branch

* Able to update App information

* Able to update  services and env variables

* Finish all project update fields

* Remove project_id field from api docs

* Remove duplicate user project app route

* Increase token expiry time

* Backend resource cleanup for removing organisations, orgnisation_members and organisation_admins

* Add github authentication route

* change route from github_auth to oauth

* remove linter changes

* Fix dependency issue

* remove pycrypt dependency

* Add linting

* handle null email

* fix null git name issue

* feat: add db stats

* refactor: improve effeciency by reducing loops

* feat: add cluster count stats metadata

* feat: add summary status stats to deployments

* Add env variables and command to app detail info

* Add new user graph data

* feat: create graph data for apps

* refactor graph method implementation

* change graph method to class method

* Remove old configs (#261)

* Add organisation and project_type to project

* Enhancements (#263)

* edit config to source db variables from env

* add small nits to README file

* add updates to README, source variables in config file

* revert and only keep READme changes

* env alternative from .env in config

* edit READMe

* small nit

* feat: tag beta users (#265)

* feat: tag beta users

* correct typo

* Update app creation controllers (#266)

* update app schema fields

* update app creation controller, appschema

* update api docs

* update documentation

* Fix circleci build (#268)

* fix database password creation error

* edit circleci config

* small nit for perm

* update app update ingress rules (#269)

* add custom domain field to app model (#270)

* Let Apps and projects get deleted if the cluster doesnot exist (#271)

* Revert from custom domain to cc domain (#272)

* add revert custom domain endpoint

* Add revert url route

* remove redundant print statement

* remove duplication



* update app has custom domain status, update api docs, routes (#273)

* Add Authorization to roles endpoints (#277)

* Setup Pytest (#278)

* add pytest fixtures

* clean up test and report job

* add database fixture, functional tests

* Fix app update bug (#279)

* Add custom domain validation

* Add functionality to retrieve evn failed apps

* Remove custom domain commented code

* Add beta user check on app creation and up update

* Fix celery version issue (#283)

* bump celery requirement

* celery version

* GitHub workflow run tests and linter (#280)

* run tests and linter before pushing changes to repository

* skip linting

* clean versions

* remove redundant flake 8 requirement

* add warnings flag to workflow

* modify pytest run command

* delete redundant file

* define env in workflow

* edit app config name

* Add admin custom db route

* Extend database models(Billing) (#285)

* - add billing invoice model

* - add billing metrics model

* - add user payment details model

* - billing invoice schema

* - add models to manager module

* - update migrations with chnages

* CI/CD Revamp (#286)

* Test workflow should run on all pushes and PRs.

* Add staging workflow

* Add staging values file.

* Fix action reference.

* Remove not yet defined action.

* Specify namespace on rollout status.

* Remove circleci config.

* Restrict branch

* refactor: remove db status check on admin endpoint for retrieving all dbs

* Store transaction record on success (#287)

* - create transaction model and register in manage
module

* add transaction record schema

* add migrations

* - add transaction record endpoint

* - update api docs

* - register controller

* - register transaction route

* - small shema refactor

* add date created field

* - add date created field

* Add production workflows. (#289)

* Show user transactions and transaction detail (#291)

* - add user transactions view

* - add user transaction api docs

* - add transaction record detail

* - add route

* - add docs

* - update api docs

* - modify routes

* - refactor transactions endpoint

* - extend project model

* - extend model

* - update schema

* - update migrations

* fix failing post transcation route (#293)

* update transaction status (#294)

* Add billing cost endpoint (#292)

* Fix Migrations. (#295)

* Remove problematic migration(08246b2fe16f)

* Remove problematic migration(f4f92e)

* Update down_revision

* Create 011c3345849a_.py

* Add the prometheus url to a cluster (#296)

* Attach prometheus to cluster model

* Remove unused import

* Update kubernetes version and fix Ingress (#297)

* Update kubernetes version

* Remove unwanted migrations

* Add Celery to requirements.txt

* Fix app update route (#300)

* Client Invoice Integration (#298)

* - billing invoice endpoint pseudocode

* ft: create send invoice email functionality

* refactor invoice email

* - add live data integration for invoice

* - small nits

* - model change

* auto date cashed

* migrations

* Fix failing import and migration

* update html

* migration update

* schema and project model update

* - generate receipts and new invoices




* Add string checker for app url on revert app url route (#301)

* refactor:add date to transcation payload (#303)

* Ft invoice details (#302)

* small nit

* get billing invoices list

* document endpoint

* add invoice detail view

* document invoice detail view

* - handle edge cases

* Added content to invoice email and gave the table more padding to give items more space for readability (#304)

* update staging variables, circleci migration (#307)

* update staging variables, circleci migration

* - delete circleci directory

* Get Receipt details (#306)

* small nit

* get billing invoices list

* document endpoint

* add invoice detail view

* document invoice detail view

* - handle edge cases

* - add receipts schema

* - receipts detail api

* - add routes and api docs

* - clean up

* small refactor

* add date field

* Ft add monitoring modules (#305)

* Add clusters statuses

* Add clusters statuses

* Add prometheus status

* Add database statuses

* Add cranecloud apps status

* Add mira status

* Remove auth

* On the invoice, formatted date for more readability and also added currency symbol to the amount. (#308)

* Change invoice email to include invoice id, remove project id and add change name label to user name (#311)

* Add cost modal url to cluster (#309)

* Add cost modal url to cluster

* Remove commented urls

* add credits models (#312)

* add credits models

* update model rlshp

* Fix failed test



* ft: add credits to user object on fetch all users (#313)



* created controllers and endpoints for credits (#314)

* retrieve user credit record (#315)



* added endpoint to get a users credit records (#316)

* Add trailing Invoice notifications (#317)

* Add user notification

* Fix invoice quering logic

* Remove comments

* Remmove unnecessary characters from db password (#318)

* Project cost values(Kubecost) (#319)

* - use kubecost data on billing invoice

* better edge case handling

* refactor

* add payments with credits (#321)

* add name to the user object on login (#322)



* Add ugx value to billing info (#324)

Co-authored-by: Innocent Asiimwe <asiimwe@outlook.com>
Co-authored-by: mubangizi <mubangizia22@gmail.com>
Co-authored-by: “ttcollins” <“ttamalecollins@gmail.com”>
Co-authored-by: Tamale Talemwa Collins <51233620+ttcollins@users.noreply.github.com>
Co-authored-by: MutegekiHenry <henrymutegeki117@gmail.com>
Co-authored-by: Henry Mutegeki <36065782+MutegekiHenry@users.noreply.github.com>
Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>
Co-authored-by: Awath Javar Abdat <awath.abdat7@gmail.com>
Co-authored-by: bashaashma <bashaashma@gmail.com>

* fic workflow error on staging

* fix test run workflow

* implement activity logs changes (#372)

* implement activity logs fixes

* resolve conflict between developnew

* Add workflow to handle user ids if given or not a project_id

---------

Co-authored-by: Mubangizi <mubangizia22@gmail.com>

* Implementing last seen (#386)

* Implementing last seen

* Migrations for the last_seen field

* Add soft delete to Apps and Databases Models (#389)

* Add App soft delete

* Add soft delete to database model

* Implement project soft delete (#391)

* Add App soft delete

* Add soft delete to database model

* Implement project deletion

* Add pagination option (#392)

* Fix migration  (#394)

* edit migration head and test deploy

* remove test deploy

* Adding pagination to some GET endpoints (#393)

* Implementing pagination on critical get endpoints

* Additional pagination

* Update billing_invoice.py

* Update project_database.py

* Update app/controllers/receipts.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update app/controllers/transactions.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update app/controllers/users.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

---------

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* fix datetime issue with user activities (#395)

* Add Redis URL for staging and prod.  (#398)

* Add Redis URL variable

* Add redis URL variable

* Add more information to admin project details route (#397)

* Fix get all projects for admin

* Able to see project overview information as an admin

* Add project users to return info

* Add route to get cluster projects  (#396)

* Add get projects route

* Add route to api docs

* Ft admin disable projects (#400)

* implement project disable/enable

* merge develop-new changes

* show project and database disabled for UI (#402)

* Adding pagination to kube routes (#403)

* Adding number of pages to the pagination information returned (#404)

* Ft enable disable admin only (#408)

* add admin enable/disable feature

* removed commented code

* codecov 2.1.12 is deprecated upgraded to 2.1.13

* Upgrade select packages (#407)

* - upgrade cryptograpy, redis and werkzeug packages

* - test deploy upgrade branch

* - upgrade codecov to version 2.1.13

* - remove test deploy branch

* clean up for merge

* getting projects now return admin_disabled field (#410)

* Implemented search feature for projects in the backend (#411)

* resolve app status check (#413)

Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>

* Fix codecov support issue(Deprecated) (#415)

* - purge codecov requirement

* - test deploy pipeline

* - test and deploy

* - remove codecov upload

* Adding search functionality to users and apps (#412)

* Adding search functionality to users and apps

* resolve app status check (#413)

Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>

* Fix codecov support issue(Deprecated) (#415)

* - purge codecov requirement

* - test deploy pipeline

* - test and deploy

* - remove codecov upload

* Adding search functionality to users and apps

---------

Co-authored-by: Henry Mutegeki <36065782+MutegekiHenry@users.noreply.github.com>
Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>
Co-authored-by: e-ian <36891299+e-ian@users.noreply.github.com>
Co-authored-by: e-ian <ianemma70@gmail.com>

* Fixing app search functionality returning all apps (#416)

* Adding the organisation field to users object (#420)

* Adding the organisation field to users object

* Fixing tests

* Clock_settime

* User collaboration url (#421)

* user collaboration

* collaboration URL

* client URL

* feat: Add support for viewing inactive users per specific date. (#418)

* feat: Add support for viewing inactive users per specific date.

* allow user to spacify either date or the day, weeks, months or years

* compute day difference from entered date

* create a threshold of a month

* fix tests

* limit end-point for admins only

* add support for to and from date

* clean code

* update query parameters for inactive user's endpoint (#422)

added the start and date query parameter for `"/users/inactive_users":`

* Adding order_by parameter to queries (#424)

* refactor: inactive user cache, parameter handling and update API documentation (#423)

admin can get inactive users using start and end date like `users/inactive_users?start=2023-06-16&end=2023-06-12` or the days range like `users/inactive_users?range=30` for past 30 days

* Fixing reordering issues with projects (#425)

* refactor: allow search by  email (#426)

* Adding a default to user creation (#429)

* Refactor the get users endpoint to also fetch respective projects and apps (#430)

* Allow searching inactive users by date created (#427)

* refactor: Allow searching inactive users by date created

* refactor: Allow searching inactive users by date created

* Update users.py

* Update users.py

* Feat: Handle Apps not found on the cluster issue (#432)

* Add more db app table fields

* Able to save extra app information

* Add app redeploy route

* Add todo comment

* Fix migration issues (#433)

* chore: change staging branch

* Fixing the GET users endpoint and projects_count to the user-profile information (#434)

* Fix app redeploy error (#435)

* Create namespace if it doesnt exist on app creation (#438)

* Ft update admin project list: add filters and metadata (#437)

* fix brocken exception error

* add metadata and filters to project list

* fix pagination on filters

* remove organization filter

* remove organization filter api-docs

---------

Co-authored-by: Mutegeki Henry <hmutegeki@Henrys-MacBook-Pro.local>

* Applying the is_beta and verified flags on both the user's lists and graph data (#436)

* Applying the is_beta and verified flags on both the user's lists and graph data

* Adding metadata to user listings

* Update api_docs.yml

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update api_docs.yml

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update api_docs.yml

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update api_docs.yml

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Making metadata more readable

---------

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* (feat): add admin get apps route (#440)

* Add apps list and graph data

* remove /apps/summary route

* (feat) improve admin database details (#439)

* Add get db metadata

* Add filter by db floavour

* Add database graph endpoint

* chore: update certifi from 2022.12.7 to 2023.7.22 (#441)

* ch update certifi from 2022.12.7 to 2023.7.22

* update postgres auth env

* remove dataclasses

* chore: update requests (#442)

* chore: update flask from 1.1.1 to 2.0.3 (#443)

* chore: update flask from 1.1.1 to 2.0.3

* Downgrade click

* Adding the overall system endpoint (#446)

* Adding the overall system endpoint

* Update app/controllers/system_status.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update app/controllers/system_status.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Update system_status.py

---------

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* feat: remove flask script usage (#450)

* Add flask click commands

* Update usage of manage.py through the application

* uninstall flask script

* feat: add project level app disable functionality (#448)

* fix project db checker functionality

* Fix resource cleanup

* Fix ingress ExtensionsV1beta1IngressSpec issue on app deployment

* Able to disable and enable apps

* Add app database attributes

* Able to save apps as disabled

* Return right status for disabled apps

* Add app diable and enable endpoints

* Apply disable and enable helper functions

* Remove admin project disable routes

* chore: update readme with docker compose setup (#449)

* Update readme file

* update docker compose default envs

* Add redis service to docker compose

* Remove unnecessary text in README.md

* Applying the search functionality for inactive users based on email and name. (#452)

* Applying the search functionality for inactive users based on email and name.

* Update app/controllers/users.py

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Fixing indentation

---------

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* feat: add user disable and enable functionality (#453)

* chore add decription to apidocs for user auth endpoints

* Add project enable and disable helper functions

* Add user disable and enable routes

* Remove project admin disabled field

* Update user metadata

* Fixing the resend of email to collaborators through refactoring the invitation endpoint. (#454)

* Remove status endpoint (#451)

* removed the system status endpoint

* remove endpoint

* removed systemstatus in controllers and routes

* deleted two controller files

* restored system_status.py and removed status class

* restored systemstatusview import

* feat: add single database disable and enable endpoints (#455)

* Able to disable and enable database

* use disable and enable db helper functions

* feat: add admin disable functionality (#456)

* Implement admin disable to projects

* add admin disable to app level

* add admin disable to database level

* Add typing to disable and enable helper functions

* Add extra information to user details route (#458)

* Sending emails to users about the status of their accounts  (#459)

* Sending emails to users about the status of their projects and also adding emojis to lighten up the email message

* Improve-wordings

* Adding affected user to logs

* Removing emojis from email message

* Update templates/user/user_disable_enable.html

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* Adding affected user id

---------

Co-authored-by: Mubangizi Allan <mubangizia22@gmail.com>

* feat(CI/CD): add docker webhook endpoint listener (#461)

* Add docker webhook listener

* Add app image update logic

* cleanup the logic

* remove unncessary file

* Update logs info

* feat: add app logger (#462)

* Setup app logger

* Configure logger

* Add log disable and enable edge cases

* feat: update docker webhook url (#463)

* Rename webhook class

* Update webhook url

* Add module log levels

* Update newrelic version (#464)

* Update newrelic version

* Remove dataclass from pip

---------

Co-authored-by: “ttcollins” <“ttamalecollins@gmail.com”>
Co-authored-by: inno-asiimwe <asiimwe@outlook.com>
Co-authored-by: Tamale Talemwa Collins <51233620+ttcollins@users.noreply.github.com>
Co-authored-by: MutegekiHenry <henrymutegeki117@gmail.com>
Co-authored-by: Henry Mutegeki <36065782+MutegekiHenry@users.noreply.github.com>
Co-authored-by: e-ian <36891299+e-ian@users.noreply.github.com>
Co-authored-by: e-ian <ianemma70@gmail.com>
Co-authored-by: Henry Mutegeki <hmutegeki@Henrys-MacBook-Pro.local>
Co-authored-by: Awath Javar Abdat <awath.abdat7@gmail.com>
Co-authored-by: bashaashma <bashaashma@gmail.com>
Co-authored-by: Beijukabruno <105637789+Beijukabruno@users.noreply.github.com>
Co-authored-by: mubangizi <mubangizi22@gmail.com>
Co-authored-by: LanternNassi <71936382+LanternNassi@users.noreply.github.com>
Co-authored-by: denishjackson1 <72918564+denishjackson1@users.noreply.github.com>
Co-authored-by: jnsereko <58003327+jnsereko@users.noreply.github.com>
Co-authored-by: Mirembe Mariam <mirembemariam3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants