Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Uma
vtigercrm
Commits
2c4a7479
Commit
2c4a7479
authored
5 years ago
by
Uma
Browse files
Options
Downloads
Patches
Plain Diff
Fixes #1226 Profile Save permissions is addressed
parent
4bff56ed
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Settings/Profiles/models/Record.php
+6
-6
6 additions, 6 deletions
modules/Settings/Profiles/models/Record.php
with
6 additions
and
6 deletions
modules/Settings/Profiles/models/Record.php
+
6
−
6
View file @
2c4a7479
...
...
@@ -571,13 +571,13 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model {
//Standard permissions
$i
=
0
;
$count
=
count
(
$actionsIdsList
);
$
p
arams
=
array
();
$
actionP
arams
=
array
();
$actionsInsertQuery
=
'INSERT INTO vtiger_profile2standardpermissions(profileid, tabid, operation, permissions) VALUES '
;
foreach
(
$actionsIdsList
as
$actionId
=>
$permission
)
{
$actionEnabled
=
true
;
$permissionValue
=
$this
->
tranformInputPermissionValue
(
$permission
);
$actionsInsertQuery
.
=
'(?, ?, ?, ?)'
;
array_push
(
$
p
arams
,
$profileId
,
$tabId
,
$actionId
,
$permissionValue
);
array_push
(
$
actionP
arams
,
$profileId
,
$tabId
,
$actionId
,
$permissionValue
);
if
(
$i
!==
$count
-
1
)
{
$actionsInsertQuery
.
=
', '
;
...
...
@@ -585,18 +585,18 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model {
$i
++
;
}
if
(
$actionsIdsList
)
{
$db
->
pquery
(
$actionsInsertQuery
,
$
p
arams
);
$db
->
pquery
(
$actionsInsertQuery
,
$
actionP
arams
);
}
//Utility permissions
$i
=
0
;
$count
=
count
(
$utilityIdsList
);
$
p
arams
=
array
();
$
utilityP
arams
=
array
();
$utilityInsertQuery
=
'INSERT INTO vtiger_profile2utility(profileid, tabid, activityid, permission) VALUES '
;
foreach
(
$utilityIdsList
as
$actionId
=>
$permission
)
{
$permissionValue
=
$this
->
tranformInputPermissionValue
(
$permission
);
$utilityInsertQuery
.
=
'(?, ?, ?, ?)'
;
array_push
(
$
p
arams
,
$profileId
,
$tabId
,
$actionId
,
$permissionValue
);
array_push
(
$
utilityP
arams
,
$profileId
,
$tabId
,
$actionId
,
$permissionValue
);
if
(
$i
!==
$count
-
1
)
{
$utilityInsertQuery
.
=
', '
;
...
...
@@ -604,7 +604,7 @@ class Settings_Profiles_Record_Model extends Settings_Vtiger_Record_Model {
$i
++
;
}
if
(
$utilityIdsList
)
{
$db
->
pquery
(
$utilityInsertQuery
,
$
p
arams
);
$db
->
pquery
(
$utilityInsertQuery
,
$
utilityP
arams
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment