init
This commit is contained in:
57
modules/Roles/Delete.php
Executable file
57
modules/Roles/Delete.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
if(!isset($_REQUEST['record']))
|
||||
sugar_die("A record number must be specified to delete the role.");
|
||||
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
|
||||
?>
|
||||
61
modules/Roles/DeleteUserRelationship.php
Executable file
61
modules/Roles/DeleteUserRelationship.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
$focus->clear_user_relationship($focus->id, $_REQUEST['user_id']);
|
||||
|
||||
$header_URL = "Location: index.php?action={$_REQUEST['return_action']}&module={$_REQUEST['return_module']}&record={$_REQUEST['return_id']}";
|
||||
$GLOBALS['log']->debug("about to post header URL of: $header_URL");
|
||||
|
||||
header($header_URL);
|
||||
?>
|
||||
|
||||
85
modules/Roles/DetailView.html
Executable file
85
modules/Roles/DetailView.html
Executable file
@@ -0,0 +1,85 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="DetailView" id="form">
|
||||
<input type="hidden" name="module" value="Roles">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="isDuplicate" value="0">
|
||||
<input type="hidden" name="action" value="{ACTION}">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<input type="hidden" name="return_id" value="{ID}">
|
||||
<input type="hidden" name="user_id" value="">
|
||||
<input title="{APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{APP.LBL_EDIT_BUTTON_KEY}" class="button" type="submit" name="Edit" value=" {APP.LBL_EDIT_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="document.DetailView.isDuplicate.value = 1;" type="submit" name="Duplicate" value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="document.DetailView.return_action.value = 'ListView'; document.DetailView.action.value = 'Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')" type="submit" name="Delete" value=" {APP.LBL_DELETE_BUTTON_LABEL} ">
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0">
|
||||
{PAGINATION}
|
||||
<tr>
|
||||
<td width="15%" valign="top"><slot>{MOD.LBL_NAME}</slot></td>
|
||||
<td width="85%" valign="top"><slot>{NAME} </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><slot>{MOD.LBL_DESCRIPTION}</slot></td>
|
||||
<td valign="top"><slot>{DESCRIPTION} </slot></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<table class="edit view" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr><td>
|
||||
<table border="0" cellpadding="0" cellspacing="{GRIDLINE}" width="100%">
|
||||
<tbody><tr><th scope="row" colspan="2" align="left"><h4>{TAB_CHOOSER}<br>
|
||||
</td></tr></tbody></table>
|
||||
</td></tr></tbody></table>
|
||||
|
||||
<!-- END: main -->
|
||||
<!-- BEGIN: subpanel -->
|
||||
<slot>{SUBPANEL}</slot>
|
||||
<!-- END: subpanel -->
|
||||
152
modules/Roles/DetailView.php
Executable file
152
modules/Roles/DetailView.php
Executable file
@@ -0,0 +1,152 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('modules/Roles/Forms.php');
|
||||
require_once('include/DetailView/DetailView.php');
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $current_user;
|
||||
|
||||
if (!is_admin($current_user)) sugar_die("Unauthorized access to administration.");
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
$detailView = new DetailView();
|
||||
$offset=0;
|
||||
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
|
||||
$result = $detailView->processSugarBean("ROLE", $focus, $offset);
|
||||
if($result == null) {
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$focus=$result;
|
||||
} else {
|
||||
header("Location: index.php?module=Accounts&action=index");
|
||||
}
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME']. ": " . $focus->get_summary_text(), true);
|
||||
|
||||
|
||||
$GLOBALS['log']->info("Role detail view");
|
||||
|
||||
$xtpl=new XTemplate ('modules/Roles/DetailView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("GRIDLINE", $gridline);
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("RETURN_MODULE", "Roles");
|
||||
$xtpl->assign("RETURN_ACTION", "DetailView");
|
||||
$xtpl->assign("ACTION", "EditView");
|
||||
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
$xtpl->assign("DESCRIPTION", nl2br(url2html($focus->description)));
|
||||
|
||||
$detailView->processListNavigation($xtpl, "ROLE", $offset);
|
||||
|
||||
require_once("include/templates/TemplateGroupChooser.php");
|
||||
require_once("modules/MySettings/TabController.php");
|
||||
|
||||
$chooser = new TemplateGroupChooser();
|
||||
$controller = new TabController();
|
||||
$chooser->args['id'] = 'edit_tabs';
|
||||
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
$chooser->args['values_array'][0] = $focus->query_modules(1);
|
||||
$chooser->args['values_array'][1] = $focus->query_modules(0);
|
||||
|
||||
foreach ($chooser->args['values_array'][0] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][0][$value] = $app_list_strings['moduleList'][$value];
|
||||
unset($chooser->args['values_array'][0][$key]);
|
||||
}
|
||||
|
||||
foreach ($chooser->args['values_array'][1] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][1][$value] = $app_list_strings['moduleList'][$value];
|
||||
unset($chooser->args['values_array'][1][$key]);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$chooser->args['values_array'] = $controller->get_tabs_system();
|
||||
foreach ($chooser->args['values_array'][0] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
|
||||
}
|
||||
foreach ($chooser->args['values_array'][1] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$chooser->args['left_name'] = 'display_tabs';
|
||||
$chooser->args['right_name'] = 'hide_tabs';
|
||||
$chooser->args['left_label'] = $mod_strings['LBL_ALLOWED_MODULES'];
|
||||
$chooser->args['right_label'] = $mod_strings['LBL_DISALLOWED_MODULES'];
|
||||
$chooser->args['title'] = $mod_strings['LBL_ASSIGN_MODULES'];
|
||||
|
||||
$chooser->args['disable'] = true;
|
||||
$xtpl->assign("TAB_CHOOSER", $chooser->display());
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
$sub_xtpl = $xtpl;
|
||||
$old_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
echo $old_contents;
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, 'Roles');
|
||||
echo $subpanel->display();
|
||||
?>
|
||||
106
modules/Roles/EditView.html
Executable file
106
modules/Roles/EditView.html
Executable file
@@ -0,0 +1,106 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
{ERROR_STRING}
|
||||
<form name="EditView" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Roles">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="display_tabs_def">
|
||||
<input type="hidden" name="hide_tabs_def">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td><input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="set_chooser(); this.form.action.value='Save'; return check_form('EditView');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " > <input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} "></td>
|
||||
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
|
||||
<td align='right'>{ADMIN_EDIT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<p><table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="25%" scope="row"><slot>{MOD.LBL_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="35%" ><slot><input name='name' {DISABLED} tabindex='1' size='25' maxlength='25' type="text" value="{NAME}"></slot></td>
|
||||
<td width="25%" scope="row"><slot> </slot></td>
|
||||
<td width="35%"><slot> </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row"><slot> </slot></td>
|
||||
<td><slot> </slot></td>
|
||||
<td scope="row"><slot> </slot></td>
|
||||
<td><slot> </slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" scope="row"><slot>{MOD.LBL_DESCRIPTION}</slot></td>
|
||||
<td colspan="4"><slot><textarea name='description' tabindex='3' cols="80" rows="8">{DESCRIPTION}</textarea></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row"><slot> </slot></td>
|
||||
<td><slot> </slot></td>
|
||||
<td scope="row"><slot> </slot></td>
|
||||
<td><slot> </slot></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table></p>
|
||||
|
||||
<table class="edit view" border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr><td>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||
<tbody><tr><th scope="row" colspan="2" align="left"><h4>{TAB_CHOOSER}
|
||||
</td></tr></tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table></p>
|
||||
|
||||
</form>
|
||||
|
||||
{JAVASCRIPT}
|
||||
|
||||
<!-- END: main -->
|
||||
144
modules/Roles/EditView.php
Executable file
144
modules/Roles/EditView.php
Executable file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('modules/Roles/Forms.php');
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == '1') {
|
||||
$focus->id = "";
|
||||
unset($_REQUEST['record']);
|
||||
}
|
||||
global $theme;
|
||||
|
||||
|
||||
|
||||
$GLOBALS['log']->info("Role Edit View");
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
|
||||
$xtpl=new XTemplate ('modules/Roles/EditView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
|
||||
if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
// handle Create $module then Cancel
|
||||
if (empty($_REQUEST['return_id'])) {
|
||||
$xtpl->assign("RETURN_ACTION", 'index');
|
||||
}
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_chooser_js() . get_validate_record_js());
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
$xtpl->assign("DESCRIPTION", $focus->description);
|
||||
|
||||
require_once("include/templates/TemplateGroupChooser.php");
|
||||
require_once("modules/MySettings/TabController.php");
|
||||
|
||||
$chooser = new TemplateGroupChooser();
|
||||
$controller = new TabController();
|
||||
$chooser->args['id'] = 'edit_tabs';
|
||||
|
||||
if(isset($_REQUEST['record']))
|
||||
{
|
||||
$chooser->args['values_array'][0] = $focus->query_modules(1);
|
||||
$chooser->args['values_array'][1] = $focus->query_modules(0);
|
||||
|
||||
foreach ($chooser->args['values_array'][0] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][0][$value] = $app_list_strings['moduleList'][$value];
|
||||
unset($chooser->args['values_array'][0][$key]);
|
||||
}
|
||||
|
||||
foreach ($chooser->args['values_array'][1] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][1][$value] = $app_list_strings['moduleList'][$value];
|
||||
unset($chooser->args['values_array'][1][$key]);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$chooser->args['values_array'] = $controller->get_tabs_system();
|
||||
foreach ($chooser->args['values_array'][0] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][0][$key] = $app_list_strings['moduleList'][$key];
|
||||
}
|
||||
foreach ($chooser->args['values_array'][1] as $key=>$value)
|
||||
{
|
||||
$chooser->args['values_array'][1][$key] = $app_list_strings['moduleList'][$key];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$chooser->args['left_name'] = 'display_tabs';
|
||||
$chooser->args['right_name'] = 'hide_tabs';
|
||||
$chooser->args['left_label'] = $mod_strings['LBL_ALLOWED_MODULES'];
|
||||
$chooser->args['right_label'] = $mod_strings['LBL_DISALLOWED_MODULES'];
|
||||
$chooser->args['title'] = $mod_strings['LBL_ASSIGN_MODULES'];
|
||||
|
||||
$xtpl->assign("TAB_CHOOSER", $chooser->display());
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addAllFields('');
|
||||
echo $javascript->getScript();
|
||||
|
||||
|
||||
?>
|
||||
127
modules/Roles/Forms.php
Executable file
127
modules/Roles/Forms.php
Executable file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains a variety of utility functions specific to this module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function get_validate_record_js () {
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
|
||||
|
||||
$the_script = <<<EOQ
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function trim(s) {
|
||||
while (s.substring(0,1) == " ") {
|
||||
s = s.substring(1, s.length);
|
||||
}
|
||||
while (s.substring(s.length-1, s.length) == ' ') {
|
||||
s = s.substring(0,s.length-1);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
function verify_data(form) {
|
||||
var isError = false;
|
||||
var errorMessage = "";
|
||||
|
||||
if (isError == true) {
|
||||
alert("$err_missing_required_fields" + errorMessage);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// end hiding contents from old browsers -->
|
||||
</script>
|
||||
|
||||
EOQ;
|
||||
|
||||
return $the_script;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function get_chooser_js()
|
||||
{
|
||||
$the_script = <<<EOQ
|
||||
|
||||
<script type="text/javascript" language="Javascript">
|
||||
<!-- to hide script contents from old browsers
|
||||
|
||||
function set_chooser()
|
||||
{
|
||||
|
||||
var display_tabs_def = '';
|
||||
var hide_tabs_def = '';
|
||||
|
||||
for(i=0; i < object_refs['display_tabs'].options.length ;i++)
|
||||
{
|
||||
display_tabs_def += object_refs['display_tabs'].options[i].value+":::";
|
||||
}
|
||||
|
||||
for(i=0; i < object_refs['hide_tabs'].options.length ;i++)
|
||||
{
|
||||
hide_tabs_def += object_refs['hide_tabs'].options[i].value+":::";
|
||||
}
|
||||
|
||||
|
||||
document.EditView.display_tabs_def.value = display_tabs_def;
|
||||
document.EditView.hide_tabs_def.value = hide_tabs_def;
|
||||
|
||||
|
||||
}
|
||||
// end hiding contents from old browsers -->
|
||||
</script>
|
||||
EOQ;
|
||||
|
||||
return $the_script;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
49
modules/Roles/Menu.php
Executable file
49
modules/Roles/Menu.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$module_menu = Array(
|
||||
|
||||
Array("index.php?module=Roles&action=EditView&return_module=Roles&return_action=index", $mod_strings['LNK_NEW_ROLE'],"CreateRoles"),
|
||||
Array("index.php?module=Roles&action=index", $mod_strings['LNK_ROLES'],"Roles"),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
201
modules/Roles/Role.php
Executable file
201
modules/Roles/Role.php
Executable file
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Role extends SugarBean {
|
||||
|
||||
var $field_name_map;
|
||||
|
||||
var $id;
|
||||
var $deleted;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $created_by;
|
||||
var $name;
|
||||
var $description;
|
||||
var $modules;
|
||||
var $disable_row_level_security = true;
|
||||
|
||||
var $table_name = 'roles';
|
||||
var $rel_module_table = 'roles_modules';
|
||||
var $object_name = 'Role';
|
||||
var $module_dir = 'Roles';
|
||||
var $new_schema = true;
|
||||
|
||||
function Role()
|
||||
{
|
||||
parent::SugarBean();
|
||||
}
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where)
|
||||
{
|
||||
return $this->create_new_list_query($order_by, $where);
|
||||
}
|
||||
|
||||
function query_modules($allow = 1)
|
||||
{
|
||||
$query = "SELECT module_id FROM roles_modules WHERE ";
|
||||
$query .= "role_id = '$this->id' AND allow = '$allow' AND deleted=0";
|
||||
$result = $this->db->query($query);
|
||||
|
||||
$return_array = array();
|
||||
|
||||
while($row = $this->db->fetchByAssoc($result))
|
||||
{
|
||||
array_push($return_array, $row['module_id']);
|
||||
}
|
||||
|
||||
return $return_array;
|
||||
}
|
||||
function set_module_relationship($role_id, &$mod_ids, $allow)
|
||||
{
|
||||
foreach($mod_ids as $mod_id)
|
||||
{
|
||||
if($mod_id != '')
|
||||
$this->set_relationship('roles_modules', array( 'module_id'=>$mod_id, 'role_id'=>$role_id, 'allow'=>$allow ));
|
||||
}
|
||||
}
|
||||
|
||||
function clear_module_relationship($role_id)
|
||||
{
|
||||
$query = "DELETE FROM roles_modules WHERE role_id='$role_id'";
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function set_user_relationship($role_id, &$user_ids)
|
||||
{
|
||||
foreach($user_ids as $user_id)
|
||||
{
|
||||
if($user_id != '')
|
||||
$this->set_relationship('roles_users', array( 'user_id'=>$user_id, 'role_id'=>$role_id ));
|
||||
}
|
||||
}
|
||||
|
||||
function clear_user_relationship($role_id, $user_id)
|
||||
{
|
||||
$query = "DELETE FROM roles_users WHERE role_id='$role_id' AND user_id='$user_id'";
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function query_user_allowed_modules($user_id)
|
||||
{
|
||||
$userArray = array();
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
|
||||
$sql = "SELECT role_id FROM roles_users WHERE user_id='$user_id'";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
while($row = $this->db->fetchByAssoc($result))
|
||||
{
|
||||
$role_id = $row["role_id"];
|
||||
$sql = "SELECT module_id FROM roles_modules WHERE role_id='$role_id' AND allow='1'";
|
||||
$res = $this->db->query($sql);
|
||||
|
||||
while($col = $this->db->fetchByAssoc($res))
|
||||
{
|
||||
$key = $col['module_id'];
|
||||
if(!(array_key_exists($key, $userArray)))
|
||||
{
|
||||
$userArray[$key] = $app_list_strings['moduleList'][$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $userArray;
|
||||
}
|
||||
|
||||
function query_user_disallowed_modules($user_id, &$allowed)
|
||||
{
|
||||
global $moduleList;
|
||||
|
||||
$returnArray = array();
|
||||
|
||||
foreach($moduleList as $key=>$val)
|
||||
{
|
||||
if(array_key_exists($val, $allowed))
|
||||
continue;
|
||||
$returnArray[$val] = $val;
|
||||
}
|
||||
|
||||
return $returnArray;
|
||||
|
||||
}
|
||||
|
||||
function get_users()
|
||||
{
|
||||
// First, get the list of IDs.
|
||||
|
||||
|
||||
|
||||
$query = "SELECT user_id as id FROM roles_users WHERE role_id='$this->id' AND deleted=0";
|
||||
|
||||
return $this->build_related_list($query, new User());
|
||||
}
|
||||
|
||||
function check_user_role_count($user_id)
|
||||
{
|
||||
$query = "SELECT count(*) AS num FROM roles_users WHERE ";
|
||||
$query .= "user_id='$user_id' AND deleted=0";
|
||||
$result = $this->db->query($query);
|
||||
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
return $row['num'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
89
modules/Roles/Save.php
Executable file
89
modules/Roles/Save.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
$tabs_def = urldecode($_REQUEST['display_tabs_def']);
|
||||
$tabs_hide = urldecode($_REQUEST['hide_tabs_def']);
|
||||
|
||||
$allow_modules = explode(':::', $tabs_def);
|
||||
$disallow_modules = explode(':::', $tabs_hide);
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
print_r($_POST);
|
||||
unset($_POST['id']);
|
||||
|
||||
|
||||
foreach($focus->column_fields as $field)
|
||||
{
|
||||
if(isset($_POST[$field]))
|
||||
{
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$check_notify = FALSE;
|
||||
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
|
||||
$focus->clear_module_relationship($return_id);
|
||||
$focus->set_module_relationship($return_id, $allow_modules, 1);
|
||||
$focus->set_module_relationship($return_id, $disallow_modules, 0);
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module'];
|
||||
else $return_module = "Roles";
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action'];
|
||||
else $return_action = "DetailView";
|
||||
if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id'];
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
|
||||
|
||||
|
||||
?>
|
||||
68
modules/Roles/SaveUserRelationship.php
Executable file
68
modules/Roles/SaveUserRelationship.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$focus = new Role();
|
||||
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
$focus->set_user_relationship($focus->id, $_REQUEST['mass']);
|
||||
|
||||
|
||||
$header_URL = $sugar_config["site_url"] . "/index.php?action=PopupUsers&form=UsersForm&module=Users&record={$_REQUEST['record']}";
|
||||
$GLOBALS['log']->debug("about to post header URL of: $header_URL");
|
||||
|
||||
echo "<script language=javascript>\n";
|
||||
echo "<!-- //\n";
|
||||
echo " window.opener.location.reload();\n";
|
||||
echo " window.location=\"{$header_URL}\";\n";
|
||||
echo "// -->\n";
|
||||
echo "</script>";
|
||||
|
||||
?>
|
||||
|
||||
62
modules/Roles/SubPanelViewUsers.html
Executable file
62
modules/Roles/SubPanelViewUsers.html
Executable file
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
<tr height="20" >
|
||||
<td scope="col" width="25%" >{MOD.LBL_LIST_NAME}</td>
|
||||
<td scope="col" width="15%" >{MOD.LBL_LIST_USER_NAME}</td>
|
||||
<td scope="col" width="25%" >{MOD.LBL_LIST_TITLE}</td>
|
||||
<td colspan="2" scope="col" width="35%" >{MOD.LBL_LIST_DEPARTMENT}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=DetailView&module=Users&record={USER.ID}" >{USER.FIRST_NAME} {USER.LAST_NAME}</a></td>
|
||||
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=DetailView&module=Users&record={USER.ID}" >{USER.USER_NAME}</a></td>
|
||||
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=DetailView&module=Users&record={USER.ID}" >{USER.TITLE}</a></td>
|
||||
<td scope="row" valign=TOP><a href="{URL_PREFIX}index.php?action=DetailView&module=Users&record={USER.ID}" >{USER.DEPARTMENT}</a></td>
|
||||
<td nowrap align="right" valign=TOP><a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=Users&record={USER.ID}{RETURN_URL}">{EDIT_INLINE_PNG}</a> <a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=Users&record={USER.ID}{RETURN_URL}">{APP.LNK_EDIT}</a> <a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=DeleteUserRelationship&module=Roles&record={ROLE_RECORD}&user_id={USER.ID}{RETURN_URL}">{REMOVE_INLINE_PNG}</a> <a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=DeleteUserRelationship&module=Roles&record={ROLE_RECORD}&user_id={USER.ID}{RETURN_URL}">{APP.LNK_REMOVE}</a></td>
|
||||
</tr>
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
98
modules/Roles/SubPanelViewUsers.php
Executable file
98
modules/Roles/SubPanelViewUsers.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'Users');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='UsersForm' id='UsersForm'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='Users'>\n";
|
||||
if ($currentModule == 'Roles') {
|
||||
$button .= "<input type='hidden' name='record' value='$focus->id'>\n";
|
||||
}
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<input type='hidden' name='report_module'>\n";
|
||||
$button .= "<input type='hidden' name='id'>\n";
|
||||
|
||||
if ($currentModule == 'Roles')
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']." ' accessKey='".$app_strings['LBL_SELECT_BUTTON_KEY']."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL']." ' name='button' LANGUAGE=javascript onclick='window.open(\"index.php?module=Users&action=PopupUsers&html=Popup_Users_picker&form=UsersForm&record=".$focus->id."&form_submit=true&query=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
|
||||
|
||||
$button .= "</form>\n";
|
||||
|
||||
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/Roles/SubPanelViewUsers.html', $current_module_strings);
|
||||
|
||||
$ListView->xTemplateAssign("ROLE_RECORD", $focus->id);
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id=".$focus->id);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] );
|
||||
$ListView->setQuery("", "", "user_name", "USER");
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "USER");
|
||||
|
||||
?>
|
||||
56
modules/Roles/field_arrays.php
Executable file
56
modules/Roles/field_arrays.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['Role'] = array ('column_fields' => array (
|
||||
'id', 'date_entered', 'date_modified',
|
||||
'modified_user_id', 'created_by', 'name',
|
||||
'description',
|
||||
),
|
||||
'list_fields' => array (
|
||||
'id','name','description',
|
||||
),
|
||||
'required_fields' => array (
|
||||
'name'=>1,
|
||||
),
|
||||
);
|
||||
?>
|
||||
59
modules/Roles/language/en_us.lang.php
Executable file
59
modules/Roles/language/en_us.lang.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_ROLE' => 'Role: ',
|
||||
'LBL_LANGUAGE' => 'Language: ',
|
||||
'LBL_MODULE_NAME' => 'Roles',
|
||||
'LBL_MODULE_TITLE' => 'Roles: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Role Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Role List',
|
||||
'LNK_NEW_ROLE' => 'Create Role',
|
||||
'LNK_ROLES' => 'Roles',
|
||||
'LBL_NAME' => 'Name: ',
|
||||
'LBL_DESCRIPTION' => 'Description: ',
|
||||
'LBL_ALLOWED_MODULES' => 'Allowed Modules: ',
|
||||
'LBL_DISALLOWED_MODULES' => 'Disallowed Modules: ',
|
||||
'LBL_ASSIGN_MODULES' => 'Edit Modules: ',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Roles',
|
||||
'LBL_USERS'=>'Users',
|
||||
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Users',
|
||||
);
|
||||
?>
|
||||
79
modules/Roles/language/pl_pl.help.DetailView.html
Executable file
79
modules/Roles/language/pl_pl.help.DetailView.html
Executable file
@@ -0,0 +1,79 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Roles</h1>
|
||||
|
||||
<p>Use this page to view and set access permissions for the selected module.
|
||||
|
||||
You can set permissions at the module-level or at a field-level. The page displays the role's module-level permissions. To view field level permissions, select the module from the left panel. The page refreshes to display module level permissions in the top panel and field-level permissions in the bottom panel.
|
||||
|
||||
<p>Set module-level permissions as follows:
|
||||
<ul>
|
||||
<li>In the Access column, click <span class="helpButton">Not Set</span> and select <span class="helpButton">Enabled</span> to allow access, or <span class="helpButton">Disabled</span> to hide the module.
|
||||
<li>In the Access Type column, select of the following:
|
||||
<ul>
|
||||
<li><span class="helpButton">Not Set</span>: to ensure that the role does not affect a particular setting.
|
||||
<li><span class="helpButton">Normal</span>: to grant permissions to view and manage records depending on team membership.
|
||||
<li><span class="helpButton">Admin</span>: to grant permissions to view and administer all records in the module regardless of team membership.
|
||||
<li><span class="helpButton">Developer</span>: to grant developer privileges for the specified module. This allows the user access to the administration and developer tools, namely Studio, Workflow Management, and Dropdown Editor. However, the user needs the appropriate team membership to view and manage records.
|
||||
<li><span class="helpButton">Admin & Developer</span>: to grant developer privileges for the specified module. This allows the user access to the administration and developer tools, namely Studio, Workflow Management, and Dropdown Editor. The user does not need team membership to view and manage records.
|
||||
</ul>
|
||||
<li>In the Delete column, click <span class="helpButton">Not Set</span> and select one of the following:
|
||||
<ul>
|
||||
<li>Select <span class="helpButton">All</span> to allow any user to delete records.
|
||||
<li>Select <span class="helpButton">Owner</span> to allow only record owners to delete records.
|
||||
<li>Select <span class="helpButton">None</span> to prevent all users from deleting records.
|
||||
</ul>
|
||||
Similarly, set permissions to edit records, export records, and import records. Set permissions for ListView in the List column. Set permissions for the DetailView in the View column.
|
||||
|
||||
<p>To set field-level permissions, click <span class="helpButton">Not Set</span> for the desired field and select one of the following:
|
||||
<ul>
|
||||
<li><span class="helpButton">Read/Write</span>: Allows all users to view and edit records.
|
||||
<li><span class="helpButton">Read/Owner Write</span>: Allows all users to view the records; only the record owner can edit the record.
|
||||
<li><span class="helpButton">Read Only</span>:Allows all users to only view the record.
|
||||
<li><span class="helpButton">Owner Read/Owner Write</span>: Allows only the record owner to read and edit the record.
|
||||
<li><span class="helpButton">>None</span>: Hides the field from all users.
|
||||
</ul>
|
||||
A field with a plus sign (+) indicates a field group. For example, Billing Street includes the City, State, Postalcode, and Country. The permissions that you set for such a field applies to the whole group.
|
||||
|
||||
<p>Click <span class="helpButton">Save</span> to save your changes.
|
||||
|
||||
|
||||
|
||||
|
||||
61
modules/Roles/language/pl_pl.help.EditView.html
Executable file
61
modules/Roles/language/pl_pl.help.EditView.html
Executable file
@@ -0,0 +1,61 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Role</h1>
|
||||
|
||||
<p>Use this page to create roles and grant them access to Sugar modules.</p>
|
||||
<p>To create a role, enter the following information and click <span class="helpButton">Save</span>:
|
||||
<ul>
|
||||
<li><span class="helpButton">Name</span>: Enter a name for the role.</li>
|
||||
<li><span class="helpButton">Description</span>: Enter a brief description of the role.</li>
|
||||
</ul>
|
||||
<p>A list of current permissions for existing modules display on the page. Specify access to one or more modules. By default, access is enabled for all modules.
|
||||
<ul>
|
||||
<li>To deny access to a module, click Not Set corresponding to the module in the Access column, and from the drop-down list, select <span class="helpButton">Disabled</span>.
|
||||
<li>To specify end-user privileges or administrator privileges, click <span class="helpButton">Not Set</span> in the Access Type column and select <span class="helpButton">Normal</span> or <span class="helpButton">Admin</span> respectively.
|
||||
<li>To allow a specific privilege for a module, such as editing or deleting records, click <span class="helpButton">Not Set</span>in the appropriate Action column, such as List for ListView or View for DetailView, corresponding to the module and select one of the following:
|
||||
<ul>
|
||||
<li>All. Allows all users of the specified Access type to delete a record in the module.
|
||||
<li>Owner. Allows only the record owner to delete the record.
|
||||
<li>None. Prevents all users of the specified Access type from deleting records in the module.
|
||||
</ul>
|
||||
<p>To create the role, click <span class="helpButton">Save</span>; click <span class="helpButton">Cancel</span> to exit the page without saving your changes.</p>
|
||||
<p>To duplicate the set of permissions, on the Detail page, click Duplicate, and enter a name for the new role.
|
||||
|
||||
|
||||
54
modules/Roles/language/pl_pl.lang.php
Executable file
54
modules/Roles/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
//** W 5.2 nie istnieje **//
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_ROLE' => '>Zależności: ',
|
||||
'LBL_LANGUAGE' => 'Język: ',
|
||||
'LBL_MODULE_NAME' => 'Zależności',
|
||||
'LBL_MODULE_TITLE' => 'Zależności: Strona główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukaj zależności',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista zależności',
|
||||
'LNK_NEW_ROLE' => 'Utwórz zależność',
|
||||
'LNK_ROLES' => 'Zależności',
|
||||
'LBL_NAME' => 'Nazwa: ',
|
||||
'LBL_DESCRIPTION' => 'Opis: ',
|
||||
'LBL_ALLOWED_MODULES' => 'Dozwolone moduły: ',
|
||||
'LBL_DISALLOWED_MODULES' => 'Niedozwolone moduły: ',
|
||||
'LBL_ASSIGN_MODULES' => 'Edytuj moduły: ',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Zależności',
|
||||
'LBL_USERS'=>'Użytkownicy',
|
||||
|
||||
'LBL_USERS_SUBPANEL_TITLE' => 'Użytkownicy',
|
||||
);
|
||||
?>
|
||||
41
modules/Roles/metadata/SearchFields.php
Executable file
41
modules/Roles/metadata/SearchFields.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['Roles'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
);
|
||||
?>
|
||||
50
modules/Roles/metadata/listviewdefs.php
Executable file
50
modules/Roles/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['Roles'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '80',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
'default' => true),
|
||||
);
|
||||
54
modules/Roles/metadata/searchdefs.php
Executable file
54
modules/Roles/metadata/searchdefs.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$searchdefs['Roles'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'name' => array('name' => 'name', 'label' => 'LBL_NAME',),
|
||||
),
|
||||
'advanced_search' => array(),
|
||||
),
|
||||
);
|
||||
?>
|
||||
58
modules/Roles/metadata/subpaneldefs.php
Executable file
58
modules/Roles/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Roles'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'users' => array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Users'),
|
||||
),
|
||||
'order' => 10,
|
||||
'module' => 'Users',
|
||||
'sort_by' => 'user_name',
|
||||
'sort_order' => 'asc',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'users',
|
||||
'add_subpanel_data' => 'user_id',
|
||||
'title_key' => 'LBL_USERS_SUBPANEL_TITLE',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
60
modules/Roles/metadata/subpanels/default.php
Executable file
60
modules/Roles/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '9999%',
|
||||
),
|
||||
'description'=>array(
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'width' => '9999%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
129
modules/Roles/vardefs.php
Executable file
129
modules/Roles/vardefs.php
Executable file
@@ -0,0 +1,129 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$dictionary['Role'] = array('table' => 'roles'
|
||||
,'fields' => array (
|
||||
'id' =>
|
||||
array (
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'required'=>true,
|
||||
'type' => 'id',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'date_entered' =>
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true
|
||||
),
|
||||
'date_modified' =>
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required'=>true,
|
||||
),
|
||||
'modified_user_id' =>
|
||||
array (
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'required'=> false,
|
||||
'len' => 36,
|
||||
'reportable'=>true,
|
||||
),
|
||||
'created_by' =>
|
||||
array (
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'len' => 36,
|
||||
),
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'type' => 'varchar',
|
||||
'vname' => 'LBL_NAME',
|
||||
'len' => 150,
|
||||
'importable' => 'required',
|
||||
),
|
||||
'description' =>
|
||||
array (
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'type' => 'text',
|
||||
),
|
||||
'modules' =>
|
||||
array (
|
||||
'name' => 'modules',
|
||||
'vname' => 'LBL_MODULES',
|
||||
'type' => 'text',
|
||||
),
|
||||
'deleted' =>
|
||||
array (
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'reportable'=>false,
|
||||
),
|
||||
'users' =>
|
||||
array (
|
||||
'name' => 'users',
|
||||
'type' => 'link',
|
||||
'relationship' => 'roles_users',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_USERS',
|
||||
),
|
||||
)
|
||||
, 'indices' => array (
|
||||
array('name' =>'rolespk', 'type' =>'primary', 'fields'=>array('id')),
|
||||
array('name' =>'idx_role_id_del', 'type' =>'index', 'fields'=>array('id', 'deleted')),
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
47
modules/Roles/views/view.list.php
Executable file
47
modules/Roles/views/view.list.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
|
||||
class RolesViewList extends ViewList
|
||||
{
|
||||
public function preDisplay()
|
||||
{
|
||||
$this->lv = new ListViewSmarty();
|
||||
$this->lv->showMassupdateFields = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user