Add hierarhical managment #5

Merged
akrdzic merged 3 commits from hierarchical-organization-managment into master 2018-07-09 16:51:20 +02:00
akrdzic commented 2018-07-09 12:50:28 +02:00 (Migrated from gitlab.com)

Assana card: https://app.asana.com/0/697944902557002/721180604738689

Document: https://docs.google.com/document/d/1WM64QjyvbLfT48Tq7Lubk_sR27IqOzeIiczYiOR--d4/edit?usp=sharing

Tested possibility of categorizing users into organizations and granting access permissions on orders
based on user organization and its departments.

NOTE: I updated wordpress to latest version.

Custom hooks code is in plugin user-organization

Smoke test:

Currently I added three testing organization: Coor Nordic => Coor SE => Coor Kista where each one of them is
department of previous one. I also added three users for each one of them (coor_nordic, coor_se, coor_kista).
FIRST TEST:

  1. Upload database data from dump file.
  2. Go to woocommerce-organization and run npm install, then npm start
  3. Go to http://localhost:3000
  4. Login as every one of three registered users and move to User Dashboard tab.
  5. Notice user details and organization info
  6. Review retrieved orders list
    5.1. User coor_kista only has its own order
    5.2. User coor_se has its own and order from user coor_kista
    5.3. User coor_nordic has its own and orders of both previous users.
  7. Login as customer and go to User dashboard tab
  8. Review user info and organization info
  9. Review that customer only retrieved its own order.

SECOND TEST:

  1. Using woocommerce api keys for any of the previous users try directly accessing order by its order_id number
    wia rest api
  2. You should get Sorry, you cannot view this resource. error.
Assana card: https://app.asana.com/0/697944902557002/721180604738689 Document: https://docs.google.com/document/d/1WM64QjyvbLfT48Tq7Lubk_sR27IqOzeIiczYiOR--d4/edit?usp=sharing Tested possibility of categorizing users into organizations and granting access permissions on orders based on user organization and its departments. NOTE: I updated wordpress to latest version. Custom hooks code is in plugin `user-organization` Smoke test: Currently I added three testing organization: Coor Nordic => Coor SE => Coor Kista where each one of them is department of previous one. I also added three users for each one of them (coor_nordic, coor_se, coor_kista). FIRST TEST: 1. Upload database data from dump file. 2. Go to woocommerce-organization and run `npm install`, then `npm start` 3. Go to `http://localhost:3000` 4. Login as every one of three registered users and move to `User Dashboard` tab. 5. Notice user details and organization info 5. Review retrieved orders list 5.1. User `coor_kista` only has its own order 5.2. User `coor_se` has its own and order from user `coor_kista` 5.3. User `coor_nordic` has its own and orders of both previous users. 6. Login as `customer` and go to `User dashboard` tab 7. Review user info and organization info 8. Review that `customer` only retrieved its own order. SECOND TEST: 1. Using woocommerce api keys for any of the previous users try directly accessing order by its order_id number wia rest api 2. You should get `Sorry, you cannot view this resource.` error.
akrdzic commented 2018-07-09 12:52:43 +02:00 (Migrated from gitlab.com)

changed the description

changed the description
nedimu commented 2018-07-09 14:23:18 +02:00 (Migrated from gitlab.com)

@akrdzic One note for the name of the "user-organization" plugin. We should follow the WordPress naming convention to avoid naming collisions (user-organisation is to general), and have a organisation name in front of the plugin name. You can see my example for plugin name
"wiaas-extended-restful-api". I know that there are some third party plugins that are not flowing this. But I think we should keep all of our wiaas custom plugin code in one folder/ plugin so we could keep track of our code and distinguish it from third party plugins.

This is not important for this experiment. But in future development

@akrdzic One note for the name of the "user-organization" plugin. We should follow the WordPress naming convention to avoid naming collisions (user-organisation is to general), and have a organisation name in front of the plugin name. You can see my example for plugin name "wiaas-extended-restful-api". I know that there are some third party plugins that are not flowing this. But I think we should keep all of our wiaas custom plugin code in one folder/ plugin so we could keep track of our code and distinguish it from third party plugins. This is not important for this experiment. But in future development
nedimu commented 2018-07-09 16:51:20 +02:00 (Migrated from gitlab.com)

merged

merged
nedimu commented 2018-07-09 16:51:22 +02:00 (Migrated from gitlab.com)

mentioned in commit ae20e0eda3

mentioned in commit ae20e0eda39038a4b8428e7dc0a83892e92204d9
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: senaduka/old-experiments#5