By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 2375 - [Regression] Cannot change advanced permissions with tdesu konqueror
Summary: [Regression] Cannot change advanced permissions with tdesu konqueror
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.x [Trinity]
Hardware: Other Linux
: P5 major
Assignee: Michele Calgaro
URL:
Depends on:
Blocks: R14.0.11
  Show dependency treegraph
 
Reported: 2015-02-19 17:16 CST by Darrell
Modified: 2021-06-09 19:39 CDT (History)
5 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darrell 2015-02-19 17:16:26 CST
* Open konqueror as root.
* Select a directory.
* Select the Permissions tab.
* Select the Advanced Permissions button.
* Change an attribute.

The OK button remains disabled.
Comment 1 steff 2020-06-25 12:30:16 CDT
I found this problem still in R14.0.8 for all users.
It is triggered, if you select only one file and than open the properties dialog.
In this case the dialog OK button is never enabled.
The root cause is in the file
tdeio/tdefile/kpropertiesdialog.cpp (R14.0.8)

In Line 2163 the button is disabled if "allDisable" is true.
This is only set to false in line 2100, if aPartialPermissions is true 
I assume, this is never the case for only one file...
Changing the else tree to set allDisable to false, if we are allowed to change the permissions of one selected file gives the expected behaviour for me.

The output of diff -c for my change results in:

diff -c  kpropertiesdialog.cpp.orig kpropertiesdialog.cpp
*** kpropertiesdialog.cpp.orig  2020-06-25 19:08:59.319937119 +0200
--- kpropertiesdialog.cpp       2020-04-30 18:08:21.340400763 +0200
***************
*** 2101,2109 ****
          }
          cb->setNoChange();
        }
!       else if (d->cbRecursive && d->cbRecursive->isChecked())
        cb->setTristate();
! 
        cb->setEnabled( d->canChangePermissions );
        gl->addWidget (cb, row+2, col+1);
        switch(col) {
--- 2101,2113 ----
          }
          cb->setNoChange();
        }
!       else
!       {
!         if( d->canChangePermissions )
!           allDisable = false;
!         if (d->cbRecursive && d->cbRecursive->isChecked())
        cb->setTristate();
!       }
        cb->setEnabled( d->canChangePermissions );
        gl->addWidget (cb, row+2, col+1);
        switch(col) {

Maybe this fix helps someone.
Comment 2 steff 2020-06-25 12:32:10 CDT
I found this problem still in R14.0.8 for all users.
It is triggered, if you select only one file and than open the properties dialog.
In this case the dialog OK button is never enabled.
The root cause is in the file
tdeio/tdefile/kpropertiesdialog.cpp (R14.0.8)

In Line 2163 the button is disabled if "allDisable" is true.
This is only set to false in line 2100, if aPartialPermissions is true 
I assume, this is never the case for only one file...
Changing the else tree to set allDisable to false, if we are allowed to change the permissions of one selected file gives the expected behaviour for me.

The output of diff -c for my change results in:

diff -c  kpropertiesdialog.cpp.orig kpropertiesdialog.cpp
*** kpropertiesdialog.cpp.orig  2020-06-25 19:08:59.319937119 +0200
--- kpropertiesdialog.cpp       2020-04-30 18:08:21.340400763 +0200
***************
*** 2101,2109 ****
          }
          cb->setNoChange();
        }
!       else if (d->cbRecursive && d->cbRecursive->isChecked())
        cb->setTristate();
! 
        cb->setEnabled( d->canChangePermissions );
        gl->addWidget (cb, row+2, col+1);
        switch(col) {
--- 2101,2113 ----
          }
          cb->setNoChange();
        }
!       else
!       {
!         if( d->canChangePermissions )
!           allDisable = false;
!         if (d->cbRecursive && d->cbRecursive->isChecked())
        cb->setTristate();
!       }
        cb->setEnabled( d->canChangePermissions );
        gl->addWidget (cb, row+2, col+1);
        switch(col) {

Maybe this fix helps someone.
Comment 3 Michele Calgaro 2021-06-08 20:27:54 CDT
Hi Steff,
can you please try the solution proposed here:
https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/pulls/139

It is a slightly diffefernt version than the one you proposed but should have the same effect I believe.
Comment 4 steff 2021-06-09 10:16:41 CDT
Hi Michele,

I have tested your patch and it worked as expected. Pulling out the 
if( d->canChangePermissions ) clause from the enclosing if clause is the cleaner solution. Maybe you can remove the extra {} around cb->setTristate() in line 2107.

Thanks again for your attention.

Best
Steff
Comment 5 Michele Calgaro 2021-06-09 19:39:45 CDT
Merged into master code and backported into R14.0.x branch as well.
Thanks for highlighting this bug Steff.

>  Maybe you can remove the extra {} around cb->setTristate() in line 2107.
That was actually added on purpose. We are slowly working on a code format style for TDE, so that is in line with that. More info here is needed:
https://mirror.git.trinitydesktop.org/gitea/TDE/tde/wiki/Code-formatting-style-discussion