diff --git a/ajax.php b/ajax.php
index f9edbb55..750dee0b 100644
--- a/ajax.php
+++ b/ajax.php
@@ -57,6 +57,7 @@
$request = DevblocksPlatform::readRequest();
DevblocksPlatform::init();
+DevblocksPlatform::setExtensionDelegate('C4_DevblocksExtensionDelegate');
$session = DevblocksPlatform::getSessionService();
$settings = CerberusSettings::getInstance();
diff --git a/api/Application.class.php b/api/Application.class.php
index b386daac..b746eda8 100644
--- a/api/Application.class.php
+++ b/api/Application.class.php
@@ -48,7 +48,7 @@
* and Joe Geck.
* WEBGROUP MEDIA LLC. - Developers of Cerberus Helpdesk
*/
-define("APP_BUILD", 872);
+define("APP_BUILD", 873);
define("APP_MAIL_PATH", realpath(APP_PATH . '/storage/mail') . DIRECTORY_SEPARATOR);
include_once(APP_PATH . "/api/DAO.class.php");
@@ -604,8 +604,8 @@ public static function getInstance() {
return $license;
}
- public static function validate($key) {
- /* */foreach(array('L0NvbXBhbnk6ICguKikv'=>'b','L0VtYWlsOiAoLiopLw=='=>'c','L1VzZXJzOiAoLiopLw=='=>'d','L1NlcmlhbDogKC4qKS8='=>'s') as $k=>$v)@preg_match(base64_decode($k),$key,$matches)?@$$v=trim($matches[1]):null;@$r=array('name'=>$b,'email'=>$c,'users'=>intval($d),'serial'=>$s);foreach(array(chr(97)=>0,chr(101)=>3) as $k=>$v)if(@substr(str_replace('-','',$s),0,1).@substr(str_replace('-','',$s),4,1).@substr(str_replace('-','',$s),8,1)==@substr(strtoupper(md5(@substr($b,0,1).@substr($b,-1,1).@strlen($b).$d.@substr($c,0,1).@substr($c,-1,1).@strlen($c))),$v,3))@$r[$k]=$s;return $r;/*
+ public static function validate($key, $email) {
+ /* */foreach(array('L0NvbXBhbnk6ICguKikv'=>'b','L1VzZXJzOiAoLiopLw=='=>'d','L1NlcmlhbDogKC4qKS8='=>'s') as $k=>$v)@preg_match(base64_decode($k),$key,$matches)?@$$v=trim($matches[1]):null;@$r=array('name'=>$b,'email'=>$email,'users'=>intval($d),'serial'=>$s);foreach(array(chr(97)=>0,chr(101)=>3) as $k=>$v)if(@substr(str_replace('-','',$s),0,1).@substr(str_replace('-','',$s),4,1).@substr(str_replace('-','',$s),8,1)==@substr(strtoupper(md5(@substr($b,0,1).@substr($b,-1,1).@strlen($b).$d.@substr($email,0,1).@substr($email,4,1).@strlen($email))),$v,3))@$r[$k]=$s;return $r;/*
* we're sure being generous here! [TODO]
*/
$lines = split("\n", $key);
@@ -617,9 +617,9 @@ public static function validate($key) {
return (!empty($key))
? array(
'name' => (list($k,$v)=split(":",$lines[1]))?trim($v):null,
- 'email' => (list($k,$v)=split(":",$lines[2]))?trim($v):null,
- 'users' => (list($k,$v)=split(":",$lines[3]))?trim($v):null,
- 'serial' => (list($k,$v)=split(":",$lines[4]))?trim($v):null,
+ 'email' => $email,
+ 'users' => (list($k,$v)=split(":",$lines[2]))?trim($v):null,
+ 'serial' => (list($k,$v)=split(":",$lines[3]))?trim($v):null,
'date' => time()
)
: null;
@@ -722,3 +722,20 @@ public function get($key,$default=null) {
return $default;
}
};
+
+// [TODO] This gets called a lot when it happens after the registry cache
+class C4_DevblocksExtensionDelegate implements DevblocksExtensionDelegate {
+ static function shouldLoadExtension(DevblocksExtensionManifest $extension_manifest) {
+ // Always allow core
+ if("cerberusweb.core" == $extension_manifest->plugin_id)
+ return true;
+
+ // [TODO] This should limit to just things we can run with no session
+ // Community Tools, Cron/Update. They are still limited by their own
+ // isVisible() otherwise.
+ if(null == ($active_worker = CerberusApplication::getActiveWorker()))
+ return true;
+
+ return $active_worker->hasPriv('plugin.'.$extension_manifest->plugin_id);
+ }
+};
diff --git a/api/DAO.class.php b/api/DAO.class.php
index 2e157368..b94bffab 100644
--- a/api/DAO.class.php
+++ b/api/DAO.class.php
@@ -897,17 +897,19 @@ static function setRolePrivileges($role_id, $privileges) {
// Set ACLs according to the new master list
if(!empty($privileges) && !empty($acl)) {
- foreach($acl as $priv) { /* @var $priv DevblocksAclPrivilege */
+ foreach($privileges as $priv) { /* @var $priv DevblocksAclPrivilege */
$sql = sprintf("INSERT INTO worker_role_acl (role_id, priv_id, has_priv) ".
"VALUES (%d, %s, %d)",
$role_id,
- $db->qstr($priv->id),
- (false !== array_search($priv->id,$privileges) ? 1 : 0)
+ $db->qstr($priv),
+ 1
);
$db->Execute($sql);
}
}
+ unset($privileges);
+
self::clearCache();
}
diff --git a/index.php b/index.php
index 0809ee5f..bd755e7c 100644
--- a/index.php
+++ b/index.php
@@ -68,6 +68,7 @@
require(APP_PATH . '/api/Application.class.php');
DevblocksPlatform::init();
+DevblocksPlatform::setExtensionDelegate('C4_DevblocksExtensionDelegate');
// Request
$request = DevblocksPlatform::readRequest();
diff --git a/plugins/cerberusweb.calls/templates/calls/view.tpl b/plugins/cerberusweb.calls/templates/calls/view.tpl
index fd0fd9d4..915247fe 100644
--- a/plugins/cerberusweb.calls/templates/calls/view.tpl
+++ b/plugins/cerberusweb.calls/templates/calls/view.tpl
@@ -6,9 +6,8 @@
{$view->name} {if $view->id == 'search'}{$translate->_('views.jump_to_actions')} {/if}
{$translate->_('common.customize')|lower}
- | {$translate->_('common.copy')|lower}
+ {if $active_worker->hasPriv('core.home.workspaces')} | {$translate->_('common.copy')|lower} {/if}
|
- {* | *}
diff --git a/plugins/cerberusweb.core/classes.php b/plugins/cerberusweb.core/classes.php
index b11d051a..c53a0020 100644
--- a/plugins/cerberusweb.core/classes.php
+++ b/plugins/cerberusweb.core/classes.php
@@ -4220,6 +4220,7 @@ function saveLicensesAction() {
}
@$key = DevblocksPlatform::importGPC($_POST['key'],'string','');
+ @$email = DevblocksPlatform::importGPC($_POST['email'],'string','');
@$do_delete = DevblocksPlatform::importGPC($_POST['do_delete'],'integer',0);
if(DEMO_MODE) {
@@ -4233,12 +4234,12 @@ function saveLicensesAction() {
return;
}
- if(empty($key)) {
+ if(empty($key) || empty($email)) {
DevblocksPlatform::setHttpResponse(new DevblocksHttpResponse(array('config','settings','empty')));
return;
}
- if(null==($valid = CerberusLicense::validate($key)) || 5!=count($valid)) {
+ if(null==($valid = CerberusLicense::validate($key,$email)) || 5!=count($valid)) {
DevblocksPlatform::setHttpResponse(new DevblocksHttpResponse(array('config','settings','invalid')));
return;
}
diff --git a/plugins/cerberusweb.core/plugin.xml b/plugins/cerberusweb.core/plugin.xml
index cc1ccb16..51f8fcf4 100644
--- a/plugins/cerberusweb.core/plugin.xml
+++ b/plugins/cerberusweb.core/plugin.xml
@@ -82,7 +82,8 @@
-
+
+
@@ -105,6 +106,9 @@
+
+
+
@@ -115,6 +119,11 @@
+
+
+
+
+
diff --git a/plugins/cerberusweb.core/strings.xml b/plugins/cerberusweb.core/strings.xml
index 63ac901a..7f698d55 100644
--- a/plugins/cerberusweb.core/strings.xml
+++ b/plugins/cerberusweb.core/strings.xml
@@ -292,8 +292,11 @@
[Address Book] Can browse the address book
-
- [Address Book] Can export lists to CSV/XML
+
+ [Address Book] Can export e-mail address lists to CSV/XML
+
+
+ [Address Book] Can export organization lists to CSV/XML
@@ -316,6 +319,14 @@
[Display Ticket] Can split tickets
+
+
+ [Home] Can auto-refresh on the Home page
+
+
+ [Home] Can build private workspaces and worklists
+
+
[Knowledgebase] Can view the knowledgebase
@@ -343,6 +354,11 @@
[RSS] Can export lists as RSS feeds
+
+
+ [Tasks] Can export task lists to CSV/XML
+
+
[Tickets] Can assign tickets to other workers
@@ -371,9 +387,7 @@
[Tickets] Can use the pile sorter on lists
-
-
-
+
diff --git a/plugins/cerberusweb.core/templates/activity/index.tpl b/plugins/cerberusweb.core/templates/activity/index.tpl
index 2815b9e9..1c505031 100644
--- a/plugins/cerberusweb.core/templates/activity/index.tpl
+++ b/plugins/cerberusweb.core/templates/activity/index.tpl
@@ -11,13 +11,13 @@
var tabView = new YAHOO.widget.TabView();
{/literal}
-{foreach from=$tab_manifests item=tab_manifest}
+{foreach from=$tab_manifests item=tab_manifest}
{literal}tabView.addTab( new YAHOO.widget.Tab({{/literal}
label: '{$tab_manifest->params.title|devblocks_translate|escape:'quotes'}',
dataSrc: '{devblocks_url}ajax.php?c=activity&a=showTab&ext_id={$tab_manifest->id}{/devblocks_url}',
{if $tab_selected==$tab_manifest->params.uri}active: true,{/if}
cacheData: false
-{literal}}));{/literal}
+{literal}}));{/literal}
{/foreach}
tabView.appendTo('activityOptions');
diff --git a/plugins/cerberusweb.core/templates/configuration/tabs/acl/edit_role.tpl b/plugins/cerberusweb.core/templates/configuration/tabs/acl/edit_role.tpl
index 92c2051b..cbec43f6 100644
--- a/plugins/cerberusweb.core/templates/configuration/tabs/acl/edit_role.tpl
+++ b/plugins/cerberusweb.core/templates/configuration/tabs/acl/edit_role.tpl
@@ -45,22 +45,24 @@
{foreach from=$plugins item=plugin key=plugin_id}
{if $plugin->enabled}
- {assign var=show_plugin value=0}
- {foreach from=$acl item=priv key=priv_id}{if $priv->plugin_id==$plugin_id}{assign var=show_plugin value=1}{/if}{/foreach}
-
- {if $show_plugin}
+ {assign var=plugin_priv value="plugin."|cat:$plugin_id}
-
{$plugin->name}
-
{$translate->_('check all')|lower}
-
- {foreach from=$acl item=priv key=priv_id}
- {if $priv->plugin_id==$plugin_id}
- {$priv->label|devblocks_translate}
- {/if}
- {/foreach}
-
-
+
+ {if $plugin->id=="cerberusweb.core"}
+
+ {else}
+
{/if}
+ {$plugin->name}
+
+
{$translate->_('check all')|lower}
+ {foreach from=$acl item=priv key=priv_id}
+ {if $priv->plugin_id==$plugin_id}
+
{$priv->label|devblocks_translate}
+ {/if}
+ {/foreach}
+
+
{/if}
{/foreach}
diff --git a/plugins/cerberusweb.core/templates/configuration/tabs/settings/index.tpl b/plugins/cerberusweb.core/templates/configuration/tabs/settings/index.tpl
index 14a40b79..c0a819fe 100644
--- a/plugins/cerberusweb.core/templates/configuration/tabs/settings/index.tpl
+++ b/plugins/cerberusweb.core/templates/configuration/tabs/settings/index.tpl
@@ -48,7 +48,7 @@ Data: {$total_db_data} MB
Indexes: {$total_db_indexes} MB
Total Disk Space: {$total_db_size} MB
-Running an OPTIMIZE on the database would free up about {$total_db_slack} MB
+Running an OPTIMIZE on the database would free about {$total_db_slack} MB
Attachments:
@@ -76,6 +76,12 @@ Total Disk Space: {$total_file_size} MB
Licensed to:
{$license.name}
+ {if $license.email}
+
+ E-mail:
+ {$license.email}
+
+ {/if}
Serial Number:
{$license.serial}
@@ -96,10 +102,15 @@ Total Disk Space: {$total_file_size} MB
+
+Enter the e-mail address from your order:
+
+
Paste the license information you received with your order:
-
+
+
{$translate->_('common.save_changes')|capitalize}
Clear License
diff --git a/plugins/cerberusweb.core/templates/configuration/tabs/workers/edit_worker.tpl b/plugins/cerberusweb.core/templates/configuration/tabs/workers/edit_worker.tpl
index 615559d1..0fe7ca76 100644
--- a/plugins/cerberusweb.core/templates/configuration/tabs/workers/edit_worker.tpl
+++ b/plugins/cerberusweb.core/templates/configuration/tabs/workers/edit_worker.tpl
@@ -1,3 +1,4 @@
+ {if ((empty($license) || empty($license.serial)) && count($workers) >= 3) || (!empty($license.serial)&&!empty($license.users)&&count($workers)>=$license.users)}{*Be good!*}{assign var=disabled value=1}{/if}
@@ -15,28 +16,28 @@
First Name:
- = 3} disabled{/if}>
+
Last Name:
- = 3} disabled{/if}>
+
Title:
- = 3} disabled{/if}>
+
E-mail:
- = 3} disabled{/if}>
+
{if empty($worker->id)}Password: {else}Password:{/if}
- = 3} disabled{/if}>
+
{if empty($worker->id)} (Leave blank to automatically e-mail a randomly-generated password.){/if}
Password (again):
- = 3} disabled{/if}>
+
@@ -65,7 +66,7 @@
{foreach from=$teams item=team key=team_id}
{assign var=member value=$workerTeams.$team_id}
- = 3} disabled="disabled"{/if}>
+
is_manager}selected{/if}>Member
is_manager}selected{/if}>Manager
@@ -85,7 +86,7 @@
Administrator
{else}
- is_superuser}checked{/if}{if (empty($license) || empty($license.serial)) && count($workers) >= 3} disabled{/if}> Administrator
+ is_superuser}checked="checked"{/if}{if $disabled} disabled="disabled"{/if}> Administrator
{/if}
+ {/if}
+
@@ -32,7 +32,7 @@ tabView.addTab( new YAHOO.widget.Tab({
}));
{/literal}
-{if empty($workspaces)}
+{if empty($workspaces) && $active_worker->hasPriv('core.home.workspaces')}
{literal}
tabView.addTab( new YAHOO.widget.Tab({
label: '{/literal}{'home.tab.workspaces_intro'|devblocks_translate|escape:'quotes'}{literal}',
@@ -51,7 +51,8 @@ tabView.addTab( new YAHOO.widget.Tab({
cacheData: false
{literal}}));{/literal}
{/foreach}
-
+
+{if $active_worker->hasPriv('core.home.workspaces')}
{foreach from=$workspaces item=workspace}
{literal}tabView.addTab( new YAHOO.widget.Tab({{/literal}
label: '{$workspace|escape} ',
@@ -59,7 +60,8 @@ tabView.addTab( new YAHOO.widget.Tab({
cacheData: false,
active:{if substr($selected_tab,2)==$workspace}true{else}false{/if}
{literal}}));{/literal}
-{/foreach}
+{/foreach}
+{/if}
tabView.appendTo('homeOptions');
diff --git a/plugins/cerberusweb.core/templates/tasks/view.tpl b/plugins/cerberusweb.core/templates/tasks/view.tpl
index f5400ab2..57c9143e 100644
--- a/plugins/cerberusweb.core/templates/tasks/view.tpl
+++ b/plugins/cerberusweb.core/templates/tasks/view.tpl
@@ -5,8 +5,8 @@
{$view->name} {if $view->id == 'search'}{$translate->_('views.jump_to_actions')} {/if}
{$translate->_('common.customize')|lower}
- | {$translate->_('common.copy')|lower}
- {if $active_worker->is_superuser || $active_worker->can_export} | {$translate->_('common.export')|lower} {/if}
+ {if $active_worker->hasPriv('core.home.workspaces')} | {$translate->_('common.copy')|lower} {/if}
+ {if $active_worker->hasPriv('core.tasks.view.actions.export')} | {$translate->_('common.export')|lower} {/if}
|
{if $active_worker->hasPriv('core.rss')} | {/if}
diff --git a/plugins/cerberusweb.core/templates/tickets/ticket_view.tpl b/plugins/cerberusweb.core/templates/tickets/ticket_view.tpl
index 2cb8251f..45b519d9 100644
--- a/plugins/cerberusweb.core/templates/tickets/ticket_view.tpl
+++ b/plugins/cerberusweb.core/templates/tickets/ticket_view.tpl
@@ -10,7 +10,7 @@
{$translate->_('common.customize')|lower}
{if $active_worker->hasPriv('core.ticket.view.actions.pile_sort')} | {$translate->_('mail.piles')|lower} {/if}
{if $active_worker->hasPriv('core.mail.search')} | {$translate->_('common.search')|lower} {/if}
- | {$translate->_('common.copy')|lower}
+ {if $active_worker->hasPriv('core.home.workspaces')} | {$translate->_('common.copy')|lower} {/if}
{if $active_worker->hasPriv('core.ticket.view.actions.export')} | {$translate->_('common.export')|lower} {/if}
|
{if $active_worker->hasPriv('core.rss')} | {/if}
diff --git a/plugins/cerberusweb.crm/api/App.php b/plugins/cerberusweb.crm/api/App.php
index 169ce79d..661f05af 100644
--- a/plugins/cerberusweb.crm/api/App.php
+++ b/plugins/cerberusweb.crm/api/App.php
@@ -289,12 +289,20 @@ function saveOppPanelAction() {
// Save
if($do_delete) {
if(null != ($opp = DAO_CrmOpportunity::get($opp_id))) {
- if($active_worker->is_superuser || $active_worker->id==$opp->worker_id)
+
+ // Check privs
+ if(($active_worker->hasPriv('crm.opp.actions.create') && $active_worker->id==$opp->worker_id)
+ || ($active_worker->hasPriv('crm.opp.actions.update_nobody') && empty($opp->worker_id))
+ || $active_worker->hasPriv('crm.opp.actions.update_all'))
DAO_CrmOpportunity::delete($opp_id);
}
} elseif(empty($opp_id)) {
$emails = DevblocksPlatform::parseCsvString($email_str);
+
+ // Check privs
+ if(!$active_worker->hasPriv('crm.opp.actions.create'))
+ return;
// One opportunity per provided e-mail address
if(is_array($emails))
@@ -315,7 +323,11 @@ function saveOppPanelAction() {
);
$opp_id = DAO_CrmOpportunity::create($fields);
- // If we're adding a first comment
+ // Custom fields
+ @$field_ids = DevblocksPlatform::importGPC($_REQUEST['field_ids'], 'array', array());
+ DAO_CustomFieldValue::handleFormPost(CrmCustomFieldSource_Opportunity::ID, $opp_id, $field_ids);
+
+ // If we're adding a first comment
if(!empty($comment)) {
$fields = array(
DAO_Note::CREATED => time(),
@@ -324,14 +336,14 @@ function saveOppPanelAction() {
DAO_Note::CONTENT => $comment,
DAO_Note::WORKER_ID => $active_worker->id,
);
- $comment_id = DAO_Note::create($fields);
+ $comment_id = DAO_Note::create($fields);
}
}
} else {
if(empty($opp_id))
return;
-
+
$fields = array(
DAO_CrmOpportunity::NAME => $name,
DAO_CrmOpportunity::AMOUNT => $amount,
@@ -341,16 +353,23 @@ function saveOppPanelAction() {
DAO_CrmOpportunity::IS_CLOSED => $is_closed,
DAO_CrmOpportunity::IS_WON => $is_won,
DAO_CrmOpportunity::WORKER_ID => $worker_id,
- );
- DAO_CrmOpportunity::update($opp_id, $fields);
+ );
+
+ // Check privs
+ if(null != ($opp = DAO_CrmOpportunity::get($opp_id))
+ && (
+ ($active_worker->hasPriv('crm.opp.actions.create') && $active_worker->id==$opp->worker_id) // owns
+ || ($active_worker->hasPriv('crm.opp.actions.update_nobody') && empty($opp->worker_id)) // can edit nobody
+ || $active_worker->hasPriv('crm.opp.actions.update_all')) // can edit anybody
+ ) {
+ DAO_CrmOpportunity::update($opp_id, $fields);
+
+ // Custom fields
+ @$field_ids = DevblocksPlatform::importGPC($_REQUEST['field_ids'], 'array', array());
+ DAO_CustomFieldValue::handleFormPost(CrmCustomFieldSource_Opportunity::ID, $opp_id, $field_ids);
+ }
}
- if(!$do_delete) {
- // Custom fields
- @$field_ids = DevblocksPlatform::importGPC($_REQUEST['field_ids'], 'array', array());
- DAO_CustomFieldValue::handleFormPost(CrmCustomFieldSource_Opportunity::ID, $opp_id, $field_ids);
- }
-
// Reload view (if linked)
if(!empty($view_id) && null != ($view = C4_AbstractViewLoader::getView('', $view_id))) {
$view->render();
diff --git a/plugins/cerberusweb.crm/plugin.xml b/plugins/cerberusweb.crm/plugin.xml
index 0eb68b9b..4f0e54dc 100644
--- a/plugins/cerberusweb.crm/plugin.xml
+++ b/plugins/cerberusweb.crm/plugin.xml
@@ -10,6 +10,13 @@
api/App.php
CrmPlugin
+
+
+
+
+
+
+
diff --git a/plugins/cerberusweb.crm/strings.xml b/plugins/cerberusweb.crm/strings.xml
index 7b728059..baa5ea5b 100644
--- a/plugins/cerberusweb.crm/strings.xml
+++ b/plugins/cerberusweb.crm/strings.xml
@@ -7,6 +7,21 @@
Opportunities
+
+
+
+
+ [Opportunities] Can create opportunities
+
+
+ [Opportunities] Can manage everyone's opportunities
+
+
+ [Opportunities] Can manage unassigned opportunities
+
+
+ [Opportunities] Can export opportunity lists to CSV/XML
+
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/activity_tab/index.tpl b/plugins/cerberusweb.crm/templates/crm/opps/activity_tab/index.tpl
index c90384f0..f754fe06 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/activity_tab/index.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/activity_tab/index.tpl
@@ -1,8 +1,10 @@
+{if $active_worker->hasPriv('crm.opp.actions.create')}
+{/if}
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/display/tabs/properties.tpl b/plugins/cerberusweb.crm/templates/crm/opps/display/tabs/properties.tpl
index 5d42c4a9..d89a01f8 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/display/tabs/properties.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/display/tabs/properties.tpl
@@ -60,7 +60,13 @@
{include file="file:$core_tpl/internal/custom_fields/bulk/form.tpl" bulk=false}
+{if ($active_worker->hasPriv('crm.opp.actions.create') && $active_worker->id==$opp->worker_id)
+ || ($active_worker->hasPriv('crm.opp.actions.update_nobody') && empty($opp->worker_id))
+ || $active_worker->hasPriv('crm.opp.actions.update_all')}
{$translate->_('common.save_changes')|capitalize}
+{else}
+ You do not have permission to modify this record.
+{/if}
\ No newline at end of file
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/org/tab.tpl b/plugins/cerberusweb.crm/templates/crm/opps/org/tab.tpl
index 12d313db..d8840e52 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/org/tab.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/org/tab.tpl
@@ -1,6 +1,8 @@
+{if $active_worker->hasPriv('crm.opp.actions.create')}
+
+{/if}
{if !empty($view)}
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/rpc/peek.tpl b/plugins/cerberusweb.crm/templates/crm/opps/rpc/peek.tpl
index d7467f47..bc06ab07 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/rpc/peek.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/rpc/peek.tpl
@@ -94,13 +94,17 @@
{include file="file:$core_tpl/internal/custom_fields/bulk/form.tpl" bulk=false}
-
-
- {$translate->_('common.save_changes')}
-{if !empty($opp) && ($active_worker->is_superuser || $active_worker->id == $opp->worker_id)}
+
+{if ($active_worker->hasPriv('crm.opp.actions.create') && (empty($opp) || $active_worker->id==$opp->worker_id))
+ || ($active_worker->hasPriv('crm.opp.actions.update_nobody') && empty($opp->worker_id))
+ || $active_worker->hasPriv('crm.opp.actions.update_all')
+ }
+ {$translate->_('common.save_changes')}
{$translate->_('common.delete')|capitalize}
-{/if}
- {$translate->_('common.cancel')|capitalize}
+ {$translate->_('common.cancel')|capitalize}
+{else}
+ You do not have permission to modify this record.
+{/if}
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/ticket/tab.tpl b/plugins/cerberusweb.crm/templates/crm/opps/ticket/tab.tpl
index 12a92932..09b30877 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/ticket/tab.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/ticket/tab.tpl
@@ -1,6 +1,8 @@
+{if $active_worker->hasPriv('crm.opp.actions.create')}
+
+{/if}
{if !empty($view)}
diff --git a/plugins/cerberusweb.crm/templates/crm/opps/view.tpl b/plugins/cerberusweb.crm/templates/crm/opps/view.tpl
index 2c454255..3442fc1f 100644
--- a/plugins/cerberusweb.crm/templates/crm/opps/view.tpl
+++ b/plugins/cerberusweb.crm/templates/crm/opps/view.tpl
@@ -5,10 +5,9 @@
{$view->name} {if $view->id == 'search'}{$translate->_('views.jump_to_actions')} {/if}
-
{$translate->_('common.customize')|lower}
- | {$translate->_('common.copy')|lower}
- {if $active_worker->is_superuser || $active_worker->can_export} | {$translate->_('common.export')|lower} {/if}
+ {if $active_worker->hasPriv('core.home.workspaces')} | {$translate->_('common.copy')|lower} {/if}
+ {if $active_worker->hasPriv('crm.opp.view.actions.export')} | {$translate->_('common.export')|lower} {/if}
|
@@ -105,7 +104,7 @@
{if $total}
- bulk update
+ {if $active_worker->hasPriv('crm.opp.actions.update_all')} bulk update {/if}
{/if}
diff --git a/plugins/cerberusweb.feedback/plugin.xml b/plugins/cerberusweb.feedback/plugin.xml
index 12e034f2..9f530960 100644
--- a/plugins/cerberusweb.feedback/plugin.xml
+++ b/plugins/cerberusweb.feedback/plugin.xml
@@ -13,6 +13,8 @@
+
+
@@ -55,7 +57,7 @@
-
+
diff --git a/plugins/cerberusweb.feedback/strings.xml b/plugins/cerberusweb.feedback/strings.xml
index 26218504..902d65f4 100644
--- a/plugins/cerberusweb.feedback/strings.xml
+++ b/plugins/cerberusweb.feedback/strings.xml
@@ -16,8 +16,14 @@
[Feedback] Can create feedback entries
+
+ [Feedback] Can delete everyone's feedback entries
+
+
+ [Feedback] Can edit everyone's feedback entries
+
- [Feedback] Can export lists to CSV/XML
+ [Feedback] Can export feedback lists to CSV/XML
@@ -51,7 +57,7 @@
Link
- Worker
+ Created By