diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 6111b840555af05aaa95da4ad65847087d8f1bc2..a67d03b95f1afda74da42c4534294c8c1963d733 100644 (file)
/* execute generates the html output for this node */
function execute($isCopyPaste = false)
{
+ echo "Fix get_list for group add";
+
/* Call parent execute */
plugin::execute();
$display= "";
}
if(!$isCopyPaste){
+
/* Do we need to flip is_account state? */
- if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
/* Do we represent a valid posixAccount? */
if (isset($_POST['add_groups_finish']) && isset($_POST['groups']) &&
count($_POST['groups'])){
- /* FIX ME put the acl check into addGroup function*/
+ echo "FIXME, 302, put the acl check into addGroup function ";
#if (chk acl ($this->acl, "memberUid") == ""){
# $this->addGroup ($_POST['groups']);
# $this->is_modified= TRUE;
if (isset($_POST['delete_groupmembership']) &&
isset($_POST['group_list']) && count($_POST['group_list'])){
- /* FIX ME put the acl check into addGroup function*/
+ echo "FIXME, 302, put the acl check into addGroup function ";
#if (chk acl ($this->acl, "memberUid") == ""){
# $this->delGroup ($_POST['group_list']);
# $this->is_modified= TRUE;
function remove_from_parent()
{
/* Cancel if there's nothing to do here */
- if (!$this->initially_was_account){
+ if ((!$this->initially_was_account) || (!$this->acl_is_removeable())){
return;
}
/* Save values to object */
plugin::save_object();
+
/* Save force GID checkbox */
- if (isset ($_POST['force_ids'])){
- $data= 1;
- } else {
- $data= 0;
- }
- if ($this->force_ids != $data){
- $this->is_modified= TRUE;
+ if($this->acl_is_writeable("gidNumber") || $this->acl_is_writeable("uidNumber")){
+ if (isset ($_POST['force_ids'])){
+ $data= 1;
+ } else {
+ $data= 0;
+ }
+ if ($this->force_ids != $data){
+ $this->is_modified= TRUE;
+ }
+ $this->force_ids= $data;
}
- $this->force_ids= $data;
-
/*Save primary group settings */
if($this->acl_is_writeable("primaryGroup") && isset($_POST['primaryGroup'])){