|Version 22 (modified by 11 years ago) ( diff ),|
This relates to functionality implemented in https://code.launchpad.net/~michael-howden/sahana-eden/eden. It is being documented in the Blue Prints so that the functionality can be reviewed. Once it is approved this documentation will be shifted between:
Site Super Entity
The following are instances of the site super entity:
The Site Super Entity allows the following components to be shared between these resources through the use of a single foreign key (
org_staff) can be added as components of site instances (offices, hospitals and shelters) and organisations. There are a number of Use Cases where you may want to apply permissions based on the staff of a resource:
- Only staff of an organisation have permissions (READ, CREATE, UPDATE and/or DELETE) for their organisation resource.
- Only staff stationed at a certain site have permissions (READ, CREATE, UPDATE and/or DELETE) for their site resource.
For further flexibility, there are 2 boolean fields for staff:
no_access- If this is true, this staff member has no additional priviledges
supervisor- This gives the options for more permissive permissions for some staff.
This is done by the
shn_create_record_roles function in
models/05_org.py, which can be called from a org or site onaccept by using:
# Create roles for each organisation s3xrc.model.configure(table, onaccept = shn_staff_join_onaccept_func(tablename))
Enabling Staff Permissions
deployment_settings.security.policy = 3 # Controller-ACLs deployment_settings.aaa.has_staff_permissions = True deployment_settings.aaa.staff_acl = Permissions for staff deployment_settings.aaa.supervisor_acl = Permissions for staff flagged as "supervisor"
- Add staff to organisations and sites
To allow other components inherit the same permissions as the primary resource, the following function can be called, to add a onaccept function which will copy the "owned_by_role" from the primary resource
# Update owned_by_role to the site's owned_by_role s3xrc.model.configure( table, onaccept = shn_component_copy_role_func(component_name = tablename, resource_name = "org_site", fk = "site_id", pk = "site_id") )
- How to handle permissions for site resources - should they inherit permissions from an organisation resource?
- if a single person is assigned as staff to multiple sites or organisations, there will be multiple site records for this person. This may cause confusion when creating staff lists. Perhaps the data structure should be revised to accommodate this.
Inventories can be added to any site instance, by adding
shn_show_inv_tabs(r) to the rheader tabs for that site instance.
Who's doing What Where and When (4W)
"Who, What, Where"
The Organization Registry keeps track of all the relief organizations working in the disaster region. It captures not only the places where they are active, but also captures information on the range of services they are providing in each area.
Old PHP User Guide: http://wiki.sahanafoundation.org/doku.php?id=doc:or:english
We should aim to be able to exchange data with UN OCHA's 3W. Information about the 3W database schema, possible import methods to OCHA, and 3W controlled vocabulary lists can be found at BluePrint3W More work should be done to ensure that the schema is compatible with the BluePrint3W schema.
This means having the following tables:
- Type IS_IN_SET([Government,International Governmental Organization,International NGO,Misc,National Institution,National NGO,United Nations])
- National Staff
- International Staff
- Number of Vehicles
- Vehicle Types
- Donation Phone (gives the org an incentive to be listed)
- Logo (could be displayed on the map)
Instance of the Site super entity
- Type IS_IN_SET([Headquarters,Regional,Country,Satellite Office]) (Would "Field" be a better term than "Satellite")
- Phone 1
- Phone 2
- Address 1
- Address 2 (used for Postcode)
- Needs validation (checkbox) [NEW] or Validate
Handled by the Person Registry?
- First Name
- Last Name
Projects (previously Activities)
The Project Management module will be the main repository for Projects information.
These fields are take from a WASH (Water Health and Sanitation) Cluster form
- Organization (link to Org Table)
- Sub-Sector (opt)
- Beneficiaries (number)
- Start Date
- End Date
- Funded (Y/N)
4x Many-to-Many tables to link them
- structured like
Many-to-Many table to link Sector to Organisations.
Many-to-Many table to link Offices to Organisations.
Optional validator to limit Offices as being affiliated to just a single Organisation
Many-to-Many table to link Contacts to Offices.
Optional validator to limit Contacts as being affiliated to just a single Office
Many-to-Many table to link Contacts to Organisations.
Optional validator to limit Contacts as being affiliated to just a single Organisation
Q: Is it useful to be able to have a Contact be affiliated to an Organisation but not to an Office?
- would the default 'HQ' be appropriate?
Would be nice to add these functionalities:
- Organigram creator from the Contacts
- ID cards from the Contacts
Q: Wouldn't "Staff" be a better description than contact? Q: Contact implies just a single person for each organization.
This describes the screens laid out in a way matching with the workflow.
- Organization Dashboard (will go to the organization of the current user)
- Organizations Registry
- Org. Details
- Edit Org. (Restricted)
- Add Office
- Projects (for displayed Org.)
- New Project
- List of Organizations
- Add New Organization
- List of all Projects
- Display on Map (redirects to Map, with Project filter selected)
Filterable options to display:
- We want to be able to add Proejcts by Jurisdiction (e.g. Neighborhood for PaP)...without knowing the GIS data.
- If we do have polygons for neighborhoods, these will be displayed automatically on map.
- KML/GeoRSS feeds will just be GIS Centroids.
- Key is to be able to identify Gaps