Administration - VernonCo/ps_utils GitHub Wiki

create admin user to view additional tabs in web page

in other words, this needs ran to access the utilities.

local

cd /path/to/app_root
export FLASK_APP="app:app"
flask fab create-admin

on container

docker exec -it ps_utils[_dev] bash
export FLASK_APP="run:app"
flask fab create-admin

Add available views to users

Login as Admin and make the app available to operators by either putting on limited network or adding users

For self registration of users, you will need to add the recaptcha public and private keys and smtp (see the docker-compose.yml for environment variable names). Also, set the AUTH_USER_REGISTRATION_ROLE in your config for the default role given at registration.

Behind limited network

The config.py (or config-4passwords.py) have configuration to allow public access to the forms. However, the config has been commented out as it was not working as expected. Therefore, for public role use the security model below.

If any one on internal network can use the forms:

  • Edit public role under Security -> List Roles

  • Add ‘can list on Companies’, ‘can show on Companies’

  • Add for any services open to role : ‘can this form get on ’…, ‘can this form post on’…, ‘menu access on’…

If desiring granular control over access, use the security model.

  • Create new roles(s) under Security -> List Roles

  • Click on Security -> List Roles -> edit role

  • Add ‘can list on Companies’, ‘can show on Companies’

  • Add for any services open to role : ‘can this form get on ’…, ‘can this form post on’…, ‘menu access on’…

  • Create users and assign roles under Security > List Users

Open network

Don’t forget to change SECRET_KEY in config.py or config-4passwords.py

View user registration and roles at flask-appbuilder.readthedocs.io/en/latest/security.html. The flask_appbuilder security also shows how to change the authentication to use LDAP and create roles in line with your AD groups.

Use Admin Utilities to pull in Vendor end points and your credentials

Update Company Urls

will hit Promostandards api to pull in endpoints for all the companies and their services to store to the database. Running multiple times will only update differences and not affect previously stored credentials.

Update Passwords

will only show if you have set up the config-4passwords.py to access another database with your PS credentials will import them into ps_utils.

Company Admin

A place to view and edit company information and add your credentials. The red area has a search function that will allow you to filter results.

Supplemental Info

Provides additional information about posting to services via ajax etc.

⚠️ **GitHub.com Fallback** ⚠️