Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Refine grids code to correct actions access and visibility (revised) #15919

Draft
wants to merge 39 commits into
base: 3.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2fdb2b9
Updates batch 1
Nov 25, 2021
bed51b8
Code Refinements, Batch 1
Nov 29, 2021
0303997
Remove type declarations from class properties
Nov 29, 2021
0347792
Delete index.css
Jul 16, 2022
6fec418
Fix code quality issues
Sep 7, 2023
7b8d069
Update modMediaSource.php
Sep 7, 2023
b56ccea
Resolve conflicts
smg6511 May 7, 2024
0fe31ac
Updates batch 1
Nov 25, 2021
3a30c37
Code Refinements, Batch 1
Nov 29, 2021
44869ba
Resolve conflicts
smg6511 May 7, 2024
331f18e
Update modx.grid.role.js
smg6511 Sep 6, 2024
9978ec0
Update modx.grid.role.js
smg6511 Sep 6, 2024
b259e26
Revert edit and remove prop names and visibility
smg6511 Sep 6, 2024
2b0fa68
Base js updates and default lexicon update
smg6511 Sep 9, 2024
da701e1
Context area updates
smg6511 Sep 9, 2024
2cab251
Media Source are updates
smg6511 Sep 9, 2024
a330366
Namespaces updates
smg6511 Sep 9, 2024
ca69470
Finalize namespaces
smg6511 Sep 26, 2024
c942ec0
Finalize contexts
smg6511 Sep 26, 2024
49c759d
Finalize roles
smg6511 Sep 26, 2024
8799205
Finalize sources
smg6511 Sep 26, 2024
7adf926
Update modx.panel.user.group.js
smg6511 Sep 26, 2024
8a7f813
Update _utility.scss
smg6511 Sep 26, 2024
97cad9b
Update modx.panel.filetree.js
smg6511 Oct 21, 2024
638a142
Update modx.tree.js
smg6511 Oct 24, 2024
016eb81
Role updates
smg6511 Oct 29, 2024
4e8695d
Media Source updates
smg6511 Oct 29, 2024
0490769
Context updates
smg6511 Oct 29, 2024
5724f12
Update modx.grid.js
smg6511 Oct 29, 2024
9da688c
Update modx.panel.filetree.js
smg6511 Oct 29, 2024
426647d
More Context tweaks
smg6511 Oct 29, 2024
f4b53c4
Lexicon updates
smg6511 Oct 29, 2024
bfa828a
Dashboards updates
smg6511 Oct 29, 2024
edfe422
WIP Policies and Policy Templates
smg6511 Oct 29, 2024
8dbe031
Update modx.namespace.panel.js
smg6511 Oct 29, 2024
ca122b3
Update modx.grid.user.js
smg6511 Oct 29, 2024
d5c7316
Update utilities.js
smg6511 Oct 29, 2024
5dbf124
Update .eslintrc.js
smg6511 Oct 29, 2024
74285b1
CQ Fixups
smg6511 Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lexicon updates
  • Loading branch information
smg6511 committed Oct 29, 2024
commit f4b53c45d439937012c074c7628354c7f2e24f30
4 changes: 4 additions & 0 deletions core/lexicon/en/dashboards.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
* @subpackage lexicon
* @language en
*/
$_lang['_dashboards_default_name'] = 'Default';
$_lang['_dashboards_default_description'] = 'The built-in MODX dashboard';

$_lang['dashboard'] = 'Dashboard';
$_lang['dashboard_desc_name'] = 'The name of the Dashboard.';
$_lang['dashboard_desc_description'] = 'A short description of the Dashboard.';
$_lang['dashboard_desc_hide_trees'] = 'Checking this will hide the left-hand trees when this Dashboard is rendered on the welcome page.';
$_lang['dashboard_edit'] = 'Edit the settings and Widget placements for this Dashboard';
$_lang['dashboard_hide_trees'] = 'Hide Left-Hand Trees';
$_lang['dashboard_desc_customizable'] = 'Allow users to customize this dashboard for their accounts: create, delete and change position or size of widgets.';
$_lang['dashboard_customizable'] = 'Customizable';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
$_lang['general_information'] = 'General Information';
$_lang['general_settings'] = 'General Settings';
$_lang['go'] = 'Go';
$_lang['grid_column_creator_header'] = $_lang['creator'];
$_lang['grid_column_creator_description'] = 'Indicates the entity that created the row’s data/setting (read-only)';
$_lang['group'] = 'Group';
$_lang['guid'] = 'GUID';
$_lang['handler'] = 'Handler';
Expand Down
157 changes: 131 additions & 26 deletions core/lexicon/en/policy.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,89 @@
* @package modx
* @subpackage lexicon
*/

// Reserved Policies
$_lang['_policy_administrator_description'] = 'Context administration policy with all permissions.';
$_lang['_policy_administrator_name'] = 'Administrator';

$_lang['_policy_developer_description'] = 'Context administration policy with most Permissions except Administrator and Security functions.';
$_lang['_policy_developer_name'] = 'Developer';

$_lang['_policy_content_editor_description'] = 'Context administration policy with limited, content-editing related Permissions, but no publishing.';
$_lang['_policy_content_editor_name'] = 'Content Editor';

$_lang['_policy_context_description'] = 'A standard Context policy that you can apply when creating Context ACLs for basic read/write and view_unpublished access within a Context.';
$_lang['_policy_context_name'] = 'Context';

$_lang['_policy_element_description'] = 'MODX Element policy with all attributes.';
$_lang['_policy_element_name'] = 'Element';

$_lang['_policy_hidden_namespace_description'] = 'Hidden Namespace policy, will not show Namespace in lists.';
$_lang['_policy_hidden_namespace_name'] = 'Hidden Namespace';

$_lang['_policy_load_list_view_description'] = 'Provides load, list and view permissions only.';
$_lang['_policy_load_list_view_name'] = 'Load, List and View';

$_lang['_policy_load_only_description'] = 'A minimal policy with permission to load an object.';
$_lang['_policy_load_only_name'] = 'Load Only';

$_lang['_policy_media_source_admin_description'] = 'Media Source administration policy.';
$_lang['_policy_media_source_admin_name'] = 'Media Source Admin';

$_lang['_policy_media_source_user_description'] = 'Media Source user policy, with basic viewing and using - but no editing - of Media Sources.';
$_lang['_policy_media_source_user_name'] = 'Media Source User';

$_lang['_policy_object_description'] = 'An Object policy with all permissions.';
$_lang['_policy_object_name'] = 'Object';

$_lang['_policy_resource_description'] = 'MODX Resource Policy with all attributes.';
$_lang['_policy_resource_name'] = 'Resource';

// Reserved Policy Templates
$_lang['_policytemplate_administrator_template_description'] = 'Context administration policy template with all permissions.';
$_lang['_policytemplate_administrator_template_name'] = 'AdministratorTemplate';

$_lang['_policytemplate_context_template_description'] = 'Context Policy Template with all attributes.';
$_lang['_policytemplate_context_template_name'] = 'ContextTemplate';

$_lang['_policytemplate_element_template_description'] = 'Element Policy Template with all attributes.';
$_lang['_policytemplate_element_template_name'] = 'ElementTemplate';

$_lang['_policytemplate_media_source_template_description'] = 'Media Source Policy Template with all attributes.';
$_lang['_policytemplate_media_source_template_name'] = 'MediaSourceTemplate';

$_lang['_policytemplate_namespace_template_description'] = 'Namespace Policy Template with all attributes.';
$_lang['_policytemplate_namespace_template_name'] = 'NamespaceTemplate';

$_lang['_policytemplate_object_template_description'] = 'Object Policy Template with all attributes.';
$_lang['_policytemplate_object_template_name'] = 'ObjectTemplate';

$_lang['_policytemplate_resource_template_description'] = 'Resource Policy Template with all attributes.';
$_lang['_policytemplate_resource_template_name'] = 'ResourceTemplate';

// Reserved Template Groups
$_lang['_templategroup_administrator_description'] = 'All admin policy templates.';
$_lang['_templategroup_administrator_name'] = 'Administrator';

$_lang['_templategroup_context_description'] = 'All Context based policy templates.';
$_lang['_templategroup_context_name'] = 'Context';

$_lang['_templategroup_element_description'] = 'All Element-based policy templates.';
$_lang['_templategroup_element_name'] = 'Element';

$_lang['_templategroup_mediasource_description'] = 'All Media Source-based policy templates.';
$_lang['_templategroup_mediasource_name'] = 'Media Source';

$_lang['_templategroup_namespace_description'] = 'All Namespace based policy templates.';
$_lang['_templategroup_namespace_name'] = 'Namespace';

$_lang['_templategroup_object_description'] = 'All Object-based policy templates.';
$_lang['_templategroup_object_name'] = 'Object';

$_lang['_templategroup_resource_description'] = 'All Resource-based policy templates.';
$_lang['_templategroup_resource_name'] = 'Resource';

// General
$_lang['template_group'] = 'Template Group';
$_lang['active_of'] = '[[+active]] of [[+total]]';
$_lang['active_permissions'] = 'Active Permissions';
Expand All @@ -28,6 +111,7 @@
$_lang['policy_desc_template'] = 'The Policy Template used for this Policy. Policies get their Permission lists from their Template.';
$_lang['policy_desc_lexicon'] = 'Optional. The Lexicon Topic that this Policy uses to translate the Permissions it owns.';
$_lang['policy_duplicate_confirm'] = 'Are you sure you want to duplicate this policy and all of its data?';
$_lang['policy_edit'] = 'Edit the permissions assigned to this Policy';
$_lang['policy_err_ae'] = 'A Policy already exists with the name `[[+name]]`. Please select another name.';
$_lang['policy_err_nf'] = 'Policy not found.';
$_lang['policy_err_ns'] = 'Policy not specified.';
Expand All @@ -47,6 +131,7 @@
$_lang['policy_template_desc'] = 'A Policy Template defines which Permissions will show up in the Permissions grid when editing a specific Policy. You can add or remove specific Permissions from this template below. Note that removing a Permission from a Template will remove it from any Policies that use this Template.';
$_lang['policy_template_desc_name'] = 'The name of the Access Policy Template';
$_lang['policy_template_desc_description'] = 'Optional. A short description of the Access Policy Template. Also you might use lexicon keys here.';
$_lang['policy_template_edit'] = 'Edit the permissions assigned to this Policy Template';
$_lang['policy_template_lexicon'] = 'Lexicon Topic';
$_lang['policy_template_desc_lexicon'] = 'Optional. The Lexicon Topic that this Policy Template uses to translate the Permissions it owns.';
$_lang['policy_template_desc_template_group'] = 'The Policy Template Group to use. This is used when selecting Policies from a dropdown menu; usually they are filtered by template group. Select an appropriate group for your Policy Template.';
Expand All @@ -61,33 +146,53 @@
$_lang['policy_template_remove_confirm_in_use'] = 'Are you sure you want to delete this Policy Template? It will delete all Policies attached to this Template as well - this could break your MODX installation if any active Policies are attached to this Template.<br><br><strong>This template is used by existing Policies ([[+count]] in total). Are you sure you want to delete this template and all attached policies?</strong>';
$_lang['policy_template_remove_multiple_confirm'] = 'Are you sure you want to delete these Policy Templates? It will delete all Policies attached to these Templates as well - this could break your MODX installation if any active Policies are attached to these Templates.';
$_lang['policy_template_remove_multiple_confirm_in_use'] = 'Are you sure you want to delete these Policy Templates? It will delete all Policies attached to these Templates as well - this could break your MODX installation if any active Policies are attached to these Templates.<br><br><strong>Some of selected templates are still used by existing Policies ([[+count]] in total). Are you sure you want to delete these template and all attached policies?</strong>';

$_lang['policy_template_remove_multiple_confirm_in_use_ignoring_protected'] = 'In addition to the [[+count-templates]] Policy Templates you have selected, [[+count-policies]] Access Policies (attached to one or more of these Policy Templates) will be deleted. If any of these Access Policies are currently assigned to a permissions rule, you could break your MODX installation by removing them. (Note that the [[+protected]] protected Templates in your selection will not be removed.)
<br><br>
Are you sure you want to continue?
';


$_lang['policy_templates'] = 'Policy Templates';
$_lang['policy_templates.intro_msg'] = 'This is a list of Policy Templates which define lists of Permissions that are checked or unchecked in specific Policies.';
$_lang['policy_template_administrator_desc'] = 'Context administration policy template with all permissions.';
$_lang['policy_template_resource_desc'] = 'Resource Policy Template with all attributes.';
$_lang['policy_template_object_desc'] = 'Object Policy Template with all attributes.';
$_lang['policy_template_element_desc'] = 'Element Policy Template with all attributes.';
$_lang['policy_template_mediasource_desc'] = 'Media Source Policy Template with all attributes.';
$_lang['policy_template_context_desc'] = 'Context Policy Template with all attributes.';
$_lang['policy_template_namespace_desc'] = 'Namespace Policy Template with all attributes.';
$_lang['policy_template_group_administrator_desc'] = 'All admin policy templates.';
$_lang['policy_template_group_object_desc'] = 'All Object-based policy templates.';
$_lang['policy_template_group_resource_desc'] = 'All Resource-based policy templates.';
$_lang['policy_template_group_element_desc'] = 'All Element-based policy templates.';
$_lang['policy_template_group_mediasource_desc'] = 'All Media Source-based policy templates.';
$_lang['policy_template_group_namespace_desc'] = 'All Namespace based policy templates.';
$_lang['policy_template_group_context_desc'] = 'All Context based policy templates.';
$_lang['policy_resource_desc'] = 'MODX Resource Policy with all attributes.';
$_lang['policy_administrator_desc'] = 'Context administration policy with all permissions.';
$_lang['policy_load_only_desc'] = 'A minimal policy with permission to load an object.';
$_lang['policy_load_list_and_view_desc'] = 'Provides load, list and view permissions only.';
$_lang['policy_object_desc'] = 'An Object policy with all permissions.';
$_lang['policy_element_desc'] = 'MODX Element policy with all attributes.';
$_lang['policy_content_editor_desc'] = 'Context administration policy with limited, content-editing related Permissions, but no publishing.';
$_lang['policy_media_source_admin_desc'] = 'Media Source administration policy.';
$_lang['policy_media_source_user_desc'] = 'Media Source user policy, with basic viewing and using - but no editing - of Media Sources.';
$_lang['policy_developer_desc'] = 'Context administration policy with most Permissions except Administrator and Security functions.';
$_lang['policy_context_desc'] = 'A standard Context policy that you can apply when creating Context ACLs for basic read/write and view_unpublished access within a Context.';
$_lang['policy_hidden_namespace_desc'] = 'Hidden Namespace policy, will not show Namespace in lists.';
$_lang['policy_count'] = 'Policy Count';
$_lang['policy_query_name_only'] = 'Search by Name only';

// Deprecated keys, keep for BC until ...
$_lang['policy_administrator_desc'] = $_lang['_policy_administrator_description'];
$_lang['policy_context_desc'] = $_lang['_policy_context_description'];
$_lang['policy_content_editor_desc'] = $_lang['_policy_content_editor_description'];
$_lang['policy_developer_desc'] = $_lang['_policy_developer_description'];
$_lang['policy_element_desc'] = $_lang['_policy_element_description'];
$_lang['policy_hidden_namespace_desc'] = $_lang['_policy_hidden_namespace_description'];
$_lang['policy_load_list_and_view_desc'] = $_lang['_policy_load_list_view_description'];
$_lang['policy_load_only_desc'] = $_lang['_policy_load_only_description'];
$_lang['policy_media_source_admin_desc'] = $_lang['_policy_media_source_admin_description'];
$_lang['policy_media_source_user_desc'] = $_lang['_policy_media_source_user_description'];
$_lang['policy_object_desc'] = $_lang['_policy_object_description'];
$_lang['policy_resource_desc'] = $_lang['_policy_resource_description'];

$_lang['policy_template_administrator_desc'] = $_lang['_policytemplate_administrator_template_description'];
$_lang['policy_template_context_desc'] = $_lang['_policytemplate_context_template_description'];
$_lang['policy_template_element_desc'] = $_lang['_policytemplate_element_template_description'];
$_lang['policy_template_mediasource_desc'] = $_lang['_policytemplate_media_source_template_description'];
$_lang['policy_template_namespace_desc'] = $_lang['_policytemplate_namespace_template_description'];
$_lang['policy_template_object_desc'] = $_lang['_policytemplate_object_template_description'];
$_lang['policy_template_resource_desc'] = $_lang['_policytemplate_resource_template_description'];

// Temporary keys needed before future change of Policy Template names (adding spaces to allow translation)
$_lang['_policytemplate_administratortemplate_description'] = $_lang['_policytemplate_administrator_template_description'];
$_lang['_policytemplate_contexttemplate_description'] = $_lang['_policytemplate_context_template_description'];
$_lang['_policytemplate_elementtemplate_description'] = $_lang['_policytemplate_element_template_description'];
$_lang['_policytemplate_mediasourcetemplate_description'] = $_lang['_policytemplate_media_source_template_description'];
$_lang['_policytemplate_namespacetemplate_description'] = $_lang['_policytemplate_namespace_template_description'];
$_lang['_policytemplate_objecttemplate_description'] = $_lang['_policytemplate_object_template_description'];
$_lang['_policytemplate_resourcetemplate_description'] = $_lang['_policytemplate_resource_template_description'];

$_lang['policy_template_group_administrator_desc'] = $_lang['_templategroup_administrator_description'];
$_lang['policy_template_group_context_desc'] = $_lang['_templategroup_context_description'];
$_lang['policy_template_group_element_desc'] = $_lang['_templategroup_element_description'];
$_lang['policy_template_group_mediasource_desc'] = $_lang['_templategroup_mediasource_description'];
$_lang['policy_template_group_namespace_desc'] = $_lang['_templategroup_namespace_description'];
$_lang['policy_template_group_object_desc'] = $_lang['_templategroup_object_description'];
$_lang['policy_template_group_resource_desc'] = $_lang['_templategroup_resource_description'];
2 changes: 1 addition & 1 deletion core/lexicon/en/source.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
$_lang['source_access_remove_confirm'] = 'Are you sure you want to delete Access to this Source for this User Group?';
$_lang['source_access_update'] = 'Edit Access';
$_lang['source_description_desc'] = 'A short description of the Media Source.';
$_lang['source_edit'] = 'Edit the settings for this source';
$_lang['source_edit'] = 'Edit the settings and User Group access for this Media Source';
$_lang['source_err_ae_name'] = 'A Media Source with that name already exists! Please specify a new name.';
$_lang['source_err_name_reserved'] = 'The source name “[[+reservedName]]” is reserved. Please choose another name.';
$_lang['source_err_nf'] = 'Media Source not found!';
Expand Down
5 changes: 3 additions & 2 deletions core/lexicon/en/user.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*/
$_lang['_role_member_description'] = 'The lowest-authority role, usually a user of the site but not of the manager.';
$_lang['_role_member_name'] = 'Member';
$_lang['_role_superuser_description'] = 'The highest-authority role, for manager users with complete control over all aspects of the site.';
$_lang['_role_superuser_name'] = 'Super User';
$_lang['_role_super_user_description'] = 'The highest-authority role, for manager users with complete control over all aspects of the site.';
$_lang['_role_super_user_name'] = 'Super User';

$_lang['active'] = 'Active';
$_lang['address'] = 'Address';
$_lang['administrator'] = 'Administrator';
Expand Down
Loading