The project_rights module contains various project related functions.

Functions

FunctionParametersReturn ValueDescription
call_project_by_type(pr_id, focus_module_name='', disabled_subs=[], tcalc=False)pr_id: Project ID

focus_module_name: Python ID
disabled_subs: List of module ids
tcalc: True or False
A Module objectOpen a specific module. When focus_module_name is given, the global setting with that python id will be retrieved, the Alpha (120) will be read, and, if that module is part of the project module panel, it will be focused. disabled_subs is a list of module ids that should not be loaded in the panel. When tcalc is True, the project is calculated before it is opened.
call_project_report(pr_id, report_id, prg_report=False, report_module_id=None)pr_id: Project ID
report_id: status report

prg_report: True or False
report_module_id: MOD

Open a status report
current_user_is_mpm()
True or FalseChecks the value of Object rights to see whether the currently logged in user is a MPM, PM, or MPM & MRM
current_user_is_multi_portfolio_manager()
True or FalseChecks the value of Object rights to see whether the currently logged in user is a PM
current_user_is_multi_req_manager()
True or FalseChecks the value of Object rights to see whether the currently logged in user is a MRM, PM, or MPM & MRM
get_project_is_main_project(pr_id)pr_id: Project IDTrue or FalseChecks whether a project is a main project
get_project_rights(pr_id)pr_id: Project IDSee get_rights_for_projectReturns the project rights of the user who is currently logged in. See get_rights_for_project
get_rights_for_project(user, project_id)user: User
project_id: Project ID
ppms.constants.PROJECT_RIGHTS_FORBIDDEN, ppms.constants.PROJECT_RIGHTS_VIEW, ppms.constants.PROJECT_RIGHTS_PARTLY_EDIT or ppms.constants.PROJECT_RIGHTS_FULL_EDITGets the access rights of a specific user for a specific project
get_stakeholder_access_rights(user, project_id)user: User
project_id: Project ID
ppms.constants.STAKEHOLDER_RIGHTS_NO_STAKEHOLDER, ppms.constants.STAKEHOLDER_RIGHTS_VIEW or ppms.constants.STAKEHOLDER_RIGHTS_EDITGets the highest stakeholder rights the user has in this project
get_user_access_rights_for_project_by_access_code(user, project_id)user: User
project_id: Project ID
ppms.constants.PROJECT_RIGHTS_VIEW or ppms.constants.PROJECT_RIGHTS_FORBIDDENCompares the users Project access with the Cost center structure code of the projects to determine his/her access right
resource_is_assigned_to_task_in_project(resource, project_id)resource: Resource
project_id: Project ID
True or FalseChecks whether the given resource is assigned to any task in the project
set_report_title(pr_id, report_id, current_report_title='')pr_id: Project ID
report_id: status report

current_report_title: Desired report name

Rename a status report. If no name is given, a default is generated based on the report id
user_is_mpm(user)user: UserTrue or FalseChecks the value of Object rights to see whether the user is a MPM, PM, or MPM & MRM
user_is_multi_portfolio_manager(user)user: UserTrue or FalseChecks the value of Object rights to see whether the user is a PM
user_is_multi_req_manager(user)user: UserTrue or FalseChecks the value of Object rights to see whether the user is a MRM, PM, or MPM & MRM