summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 349fac7)
raw | patch | inline | side by side (parent: 349fac7)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 07:47:05 +0000 (07:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 07:47:05 +0000 (07:47 +0000) |
- Extension is only addable when the 'create' acl is given.
- To Remove the extension we need all acls.
- Updated the show_header function to use create and #all# to grey out button.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5526 594d385d-05f5-0310-b6e9-bd551577e9d8
- To Remove the extension we need all acls.
- Updated the show_header function to use create and #all# to grey out button.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5526 594d385d-05f5-0310-b6e9-bd551577e9d8
12 files changed:
index c41ac56fa96d78e279ab205772067eec37dfd660..da3441eaab7d4417e18116ebe1116060b373c19d 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
/* Show header message for tab dialogs */
function show_header($button_text, $text, $disabled= FALSE)
{
+ $state = "disabled";
+ if($this->is_account && $this->acl == "#all#"){
+ $state= "";
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $state= "";
+ }
+
if ($disabled == TRUE){
$state= "disabled";
- } else {
- $state= "";
}
+
$display= "<table summary=\"\" width=\"100%\"><tr>\n<td colspan=2><p><b>$text</b></p>\n";
- $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".
- chkacl($this->acl, "all")." ".$state.
- "><p class=\"seperator\"> </p></td></tr></table>";
+ $display.= "<input type=submit value=\"$button_text\" name=\"modify_state\" ".$state.">".
+ "<p class=\"seperator\"> </p></td></tr></table>";
return($display);
}
index 68745830f0a241c4fd57f0a36a5d741f7086b87b..736f41446cb495160e43cab22776446ec4c6290c 100644 (file)
"uid",
"vocation");
$ACLD['mailAccount']= array(
+ "create",
"custom_sieve",
"gosaMailAlternateAddress",
# "gosaMailDeliveryMode",
"drop_own_mails",
"mail",
"only_local");
-$ACLD['posixAccount']= array("allowedHosts",
+$ACLD['posixAccount']=
+ array( "create",
+ "allowedHosts",
"force_ids",
"gidNumber",
"gosaDefaultLanguage",
"shadowWarning",
"uidNumber");
$ACLD['sambaAccount']=
- array("acctFlags" => "samba2:acctFlags",
+ array(
+ "create",
+ "acctFlags" => "samba2:acctFlags",
"allow_pwchange" => "samba2:allow_pwchange",
"homeDrive" => "samba2:homeDrive",
"no_password_required" => "samba2:no_password_required",
"netatalkUserHomepath");
-$ACLD['proxyAccount']= array(
- "proxyAccount",
- "gosaProxyAcctFlags",
- "gosaProxyQuota",
- "gosaProxyWorkingStart",
- "gosaProxyWorkingStop");
-
-$ACLD['pureftpdAccount']= array(
- "pureftpd",
- "FTPUploadBandwidth",
- "FTPStatus",
- "FTPDownloadBandwidth",
- "FTPQuotaFiles",
- "FTPQuotaMBytes",
- "FTPUploadRatio",
- "FTPDownloadRatio");
$ACLD['conference']= array(
"goFonConference",
"goFonPIN",
"goFonConferenceOwner");
$ACLD['environment']=array(
+ "create",
"gotoPrinter",
"gotoEnvironment",
"gotoShare",
"gotoHotplugDevice",
"gotoShareAppleMounts"
);
+/* Connectivity accounts */
+$ACLD['phpgwAccount'] =array("create");
+$ACLD['webdavAccount'] =array("create");
+$ACLD['intranetAccount'] =array("create");
+$ACLD['phpscheduleitAccount'] =array("create");
+$ACLD['pptpAccount'] =array("create");
+$ACLD['proxyAccount'] =array("create","proxyAccount","gosaProxyAcctFlags","gosaProxyQuota",
+ "gosaProxyWorkingStart","gosaProxyWorkingStop");
+$ACLD['pureftpdAccount'] =array("create","FTPUploadBandwidth","FTPStatus",
+ "FTPDownloadBandwidth","FTPQuotaFiles","FTPQuotaMBytes",
+ "FTPUploadRatio","FTPDownloadRatio");
+$ACLD['kolabAccount'] =array("create","kolabFreeBusyFuture", "unrestrictedMailSize", "calFBURL","kolabDelegate");
+$ACLD['opengwAccount'] =array("create" =>"Enable/disable account",
+ "LocationTeam" =>"Location team",
+ "TemplateUser" =>"Template user",
+ "is_locked" =>"Lock status",
+ "TeamIDs" =>"Teams");
+
-$ACLD['phpgwAccount'] =array("phpgwAccount" );
-$ACLD['webdavAccount'] =array("webdavAccount" );
-$ACLD['intranetAccount'] =array("intranetAccount" );
$ACLD['systems'] =array("systems" );
$ACLD['FAIclass'] =array("FAIclass" );
-$ACLD['pptpAccount'] =array("gosapptp" );
-$ACLD['phpscheduleitAccount'] =array("gosaphpscheduleit" );
-$ACLD['opengwAccount'] =array( "opengwAccount" =>"Enable/disable account",
- "LocationTeam" =>"Location team",
- "TemplateUser" =>"Template user",
- "is_locked" =>"Lock status",
- "TeamIDs" =>"Teams");
-$ACLD['phoneAccount'] = array("goFonDeliveryMode",
+$ACLD['phoneAccount'] = array("create","goFonDeliveryMode",
"goFonHardware","goFonPIN","goFonVoicemailPIN","telephoneNumber", "goFonMacro");
$ACLD['nagiosAccount'] = array("NagiosAlias"
// Allow displaying of FAI menu element
"FAIclass" => "FAI management enabled");
$ACLD['goFonMacro'] =array("goFonMacro","edit","delete");
-$ACLD['kolabAccount'] =array("kolabAccount","kolabFreeBusyFuture", "unrestrictedMailSize", "calFBURL","kolabDelegate");
?>
diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc
index 1f475bf2578b022e78771964ef8bddd448cb9a92..949eee08b8c9659dfc5b2e307ca71f964aa295bb 100644 (file)
$smarty->assign("tabbed", 0);
}
- $smarty->assign('gosaIntranetACL', chkacl($this->acl, 'intranetAccount'));
+ /* Allow account status toogle? */
+ $smarty->assign("gosaIntranetACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("gosaIntranetACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("gosaIntranetACL", "");
+ }
$display.= $smarty->fetch (get_template_path('intranet.tpl', TRUE, dirname(__FILE__)));
return ($display);
function save_object()
{
/* Do we need to flip is_account state? */
- if (isset($_POST['connectivityTab'])){
- if (isset($_POST['intranet'])){
- if (!$this->is_account && $_POST['intranet'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
- }
- }
+ if (isset($_POST['connectivityTab'])){
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["intranet"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["intranet"]) && $this->acl == "#all#"){
+ $this->is_account = false;
+ }
+ }
plugin::save_object();
if (isset($_POST["INTRANETStatus"])){
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index 0518d9606a55f962cbcc4692feb45afb988c8a8e..20b26b0aab59f1cc5b8e79966a745052b93bc86b 100644 (file)
$smarty->assign("$val", $this->$val);
$smarty->assign($val."ACL", chkacl($this->acl, "$val"));
}
- $smarty->assign("kolabAccountACL", chkacl($this->acl, "kolabAccountACL"));
+
+ /* Allow account status toogle? */
+ $smarty->assign("kolabAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("kolabAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("kolabAccountACL", "");
+ }
/* Check for invitation action */
$nr= 0;
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if(isset($_POST["kolabState"])){
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["kolabState"]) && chkacl($this->acl,"create") == ""){
$this->is_account = true;
- }else{
+ }elseif($this->is_account && !isset($_POST["kolabState"]) && $this->acl == "#all#"){
$this->is_account = false;
}
diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc
index e33682c3ec7fced4b29e5f0b230281751fd59dea..2ddb1fbcb94ddcfbb8a5bd21b7249daa4214c613 100644 (file)
$smarty->assign($ar,array());
}
$smarty->assign("OGWstate"," disabled ");
- foreach(array("LocationTeam","TemplateUser","is_locked","validTeams","opengwAccount","is_account"/*,"OGWPassword"*/) as $ar){
+ foreach(array("LocationTeam","TemplateUser","is_locked","validTeams","is_account"/*,"OGWPassword"*/) as $ar){
$smarty->assign($ar,"");
$smarty->assign($ar."CHK","");
$smarty->assign($ar."ACL"," disabled ");
}
+ /* Allow account status toogle? */
+ $smarty->assign("opengwAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("opengwAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("opengwAccountACL", "");
+ }
+
/* Check database extension */
if(!is_callable("pg_connect")){
print_red(_("OpenGroupware: Your configuration is missing a postgresql extension. Can't perform any database queries."));
}
}
- /* change account status */
- if(isset($_POST['is_account'])){
- $this->is_account = $_POST['is_account'];
- }else{
- $this->is_account = false;//$_POST['is_account'];
- }
-
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["is_account"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["is_account"]) && $this->acl == "#all#"){
+ $this->is_account = false;
+ }
}
diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc
index 58c998f1e2c97cb081c69ce5225aaef0a21b1a4a..feb6154633758ba91a2544ea794880112dd8b17b 100644 (file)
$smarty->assign("$val", $this->$val);
$smarty->assign($val."ACL", chkacl($this->acl, "$val"));
}
- $smarty->assign("oxchangeAccountACL", chkacl($this->acl, "oxchangeAccount"));
+
+ /* Allow account status toogle? */
+ $smarty->assign("oxchangeAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("oxchangeAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("oxchangeAccountACL", "");
+ }
+
if ($this->is_account){
$smarty->assign("oxchangeState", "checked");
$smarty->assign("oxState", "");
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['oxchange'])){
- if (!$this->is_account && $_POST['oxchange'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["oxchange"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["oxchange"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+
+#FIXME seams to be unused code !
if (isset($_POST["oxchangeStatus"])){
$this->oxchangeStatus = "disabled";
} else {
diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc
index 6dd83674cc9baf3b9a7794327bc396863126a291..f9388a8619a82dc0337c931f0ee3718b0e362259 100644 (file)
$smarty->assign("phpgwState", "");
}
- $smarty->assign('phpgwAccountACL', chkacl($this->acl, 'phpgwAccount'));
+ /* Allow account status toogle? */
+ $smarty->assign("phpgwAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("phpgwAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("phpgwAccountACL", "");
+ }
$display.= $smarty->fetch (get_template_path('phpgw.tpl', TRUE, dirname(__FILE__)));
return ($display);
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['phpgw'])){
- if (!$this->is_account && $_POST['phpgw'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["phpgw"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["phpgw"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+
+ #FIXME seams to be unused code !
if (isset($_POST["phpgwStatus"])){
$this->phpgwStatus = "disabled";
} else {
diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc
index 073da05ca75e3d12179cb87eeb73c3c9d40a40f9..5fb939dd596463f53b5606b2397ebe224bc0aaf5 100644 (file)
$smarty->assign("wstate", "disabled");
}
- $smarty->assign('gosaphpscheduleitACL', chkacl($this->acl, 'gosaphpscheduleit'));
+ /* Allow account status toogle? */
+ $smarty->assign("gosaphpscheduleitACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("gosaphpscheduleitACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("gosaphpscheduleitACL", "");
+ }
$display.= $smarty->fetch (get_template_path('phpscheduleit.tpl', TRUE, dirname(__FILE__)));
return ($display);
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['phpscheduleit'])){
- if (!$this->is_account && $_POST['phpscheduleit'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["phpscheduleit"]) && $_POST['phpscheduleit'] == "B" && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["phpscheduleit"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+
+ #FIXME seams to be unused code !
if (isset($_POST["phpscheduleitStatus"])){
$this->pptpStatus = "disabled";
} else {
diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc
index ba416e37c3e040e1bbcd935877a3d7d8f5a53070..8ef6988c540ca32c4b12d0f92a70e12f30ad0a1c 100644 (file)
$smarty->assign("wstate", "disabled");
}
- $smarty->assign('gosapptpACL', chkacl($this->acl, 'gosapptp'));
+ /* Allow account status toogle? */
+ $smarty->assign("gosapptpACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("gosapptpACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("gosapptpACL", "");
+ }
$display.= $smarty->fetch (get_template_path('pptp.tpl', TRUE, dirname(__FILE__)));
return ($display);
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['pptp'])){
- if (!$this->is_account && $_POST['pptp'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["pptp"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["pptp"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+
+ #FIXME seams to be unused code !
if (isset($_POST["pptpStatus"])){
$this->pptpStatus = "disabled";
} else {
diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc
index cb03ec2d10b2ae254f35478873103f98ad46307c..50fb8f5594ca9fba620d6385b86865d358b51643 100644 (file)
/* Prepare templating */
$smarty= get_smarty();
- $smarty->assign("proxyAccountACL", chkacl($this->acl, "proxyAccount"));
+
+ /* Allow account status toogle? */
+ $smarty->assign("proxyAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("proxyAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("proxyAccountACL", "");
+ }
+
$smarty->assign("gosaProxyAcctFlagsACL", chkacl($this->acl, "gosaProxyAcctFlags"));
$smarty->assign("gosaProxyWorkingStartACL", chkacl($this->acl, "gosaProxyWorkingStart"));
$smarty->assign("gosaProxyWorkingStopACL", chkacl($this->acl, "gosaProxyWorkingStop"));
/* Do we need to flip is_account state? */
if ($this->parent != NULL){
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['proxy'])){
- if (!$this->is_account && $_POST['proxy'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["proxy"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["proxy"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
}
- if(isset($_POST['proxy'])){
- $this->is_account = TRUE;
- }else{
- $this->is_account = FALSE;
- }
-
/* Save flag value */
if ($this->is_account){
if (chkacl ($this->acl, "gosaProxyAcctFlags") == ""){
diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc
index 03f60b432c29d9b7285c610556468dba2ace041b..c77bc702706e1d5c757a343c9e5a9087f5bbd5f1 100644 (file)
$smarty->assign("fstate", "");
}
}
- $smarty->assign("use_FTPStatus", ($this->FTPStatus == "disabled") ? "checked" : "");
+
+ /* Allow account status toogle? */
+ $smarty->assign("pureftpdACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("pureftpdACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("pureftpdACL", "");
+ }
- $smarty->assign("pureftpdACL", chkacl($this->acl, 'pureftpd'));
+ $smarty->assign("use_FTPStatus", ($this->FTPStatus == "disabled") ? "checked" : "");
$changeState = "";
foreach($this->attributes as $attr){
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['pureftpd'])){
- if (!$this->is_account && $_POST['pureftpd'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["pureftpd"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["pureftpd"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+ #FIXME seams to be unused code !
$old= $this->FTPStatus;
if (isset($_POST["FTPStatus"])){
$this->FTPStatus = "disabled";
diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc
index 0edecd3bddd1c8d046a07ea9b96c1e1541d94144..6b9abca2742064112fba500511715b804508179c 100644 (file)
$smarty->assign("tabbed", 1);
}
- $smarty->assign('webdavAccountACL', chkacl($this->acl, 'webdavAccount'));
+ /* Allow account status toogle? */
+ $smarty->assign("webdavAccountACL", "disabled");
+ if(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $smarty->assign("webdavAccountACL", "");
+ }elseif($this->is_account && $this->acl == "#all#" ){
+ $smarty->assign("webdavAccountACL", "");
+ }
+
$display.= $smarty->fetch (get_template_path('webdav.tpl', TRUE, dirname(__FILE__)));
return ($display);
{
/* Do we need to flip is_account state? */
if (isset($_POST['connectivityTab'])){
- if (isset($_POST['webdav'])){
- if (!$this->is_account && $_POST['webdav'] == "B"){
- $this->is_account= TRUE;
- }
- } else {
- $this->is_account= FALSE;
+
+ /* Change state if needed */
+ if(!$this->is_account && isset($_POST["webdav"]) && chkacl($this->acl,"create") == ""){
+ $this->is_account = true;
+ }elseif($this->is_account && !isset($_POST["webdav"]) && $this->acl == "#all#"){
+ $this->is_account = false;
}
}
plugin::save_object();
+
+ #FIXME seams to be unused code !
if (isset($_POST["WEBDAVStatus"])){
$this->WEBDAVStatus = "disabled";
} else {