Direct Answer: What JavaScript Functions Does OnePlan Support for Enterprise Security Groups?
OnePlan provides a set of OnePlanCore
JavaScript functions that return a user’s security group information and
specific permission checks (such as whether the current user can add,
archive, or delete a plan, or whether they are an admin). These
functions were introduced to support the Enterprise Security
Groups feature and replace the no-longer-supported
PersonalConfig.GlobalPermissions.
What This Article Covers: Enterprise Security Groups JavaScript Functions
This article lists the supported JavaScript functions available for
working with Enterprise Security Groups in
OnePlan, and what each function returns. Use these
functions in place of the deprecated
PersonalConfig.GlobalPermissions.
Supported Functions
This JS library supports the Enterprise Security
Groups feature and is used to replace the no-longer-supported
PersonalConfig.GlobalPermissions. Pick any of the following
replacement functions to suit your use case:
Get Security Group Information
OnePlanCore.Security.GetMySecurityGroup()
- Returns the security group information belonging to the currently logged-in user.
Plan Permission Functions
OnePlanCore.Permissions.CanAddPlan()
- Returns true/false if the currently logged-in user can add a plan.
OnePlanCore.Permissions.CanArchivePlan()
- Returns true/false if the currently logged-in user can archive a plan.
OnePlanCore.Permissions.CanDeletePlan()
- Returns true/false if the currently logged-in user can delete a plan.
OnePlanCore.Permissions.CanEditAllPlans()
- Returns true/false if the currently logged-in user can edit all plans.
OnePlanCore.Permissions.CanViewAllPlans()
- Returns true/false if the currently logged-in user can view all plans.
Admin and Data Permission Functions
OnePlanCore.Permissions.IsAdmin()
- Returns true/false if the currently logged-in user is an admin.
OnePlanCore.Permissions.CanManageResources()
- Returns true/false if the currently logged-in user can manage resources.
OnePlanCore.Permissions.CanManageData()
- Returns true/false if the currently logged-in user can manage data (for example, Global Views).
Frequently Asked Questions: Enterprise Security Groups JavaScript Functions
Q: What replaces PersonalConfig.GlobalPermissions?
A: In OnePlan, the OnePlanCore.Security
and OnePlanCore.Permissions JavaScript functions replace
the no-longer-supported
PersonalConfig.GlobalPermissions.
Q: How do I check if the current user is an admin?
A: In OnePlan, call
OnePlanCore.Permissions.IsAdmin(), which returns true or
false based on whether the currently logged-in user is an admin.
What to Do Next: Enterprise Security Groups JavaScript Functions
Learn more about Enterprise Security Groups: - Enterprise Security Groups in OnePlan - Overview
Related API updates: - How to Assign a Security Group to a Resource via the OnePlan API
Comments
0 comments
Article is closed for comments.