https://bugs.freedesktop.org/show_bug.cgi?id=56676

Lionel Elie Mamane <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Whiteboard|                            |EasyHack
                   |                            |DifficultyInteresting
                   |                            |SkillCpp SkillSQL TopicUI
           Severity|normal                      |enhancement
           Priority|medium                      |low

--- Comment #7 from Lionel Elie Mamane <[email protected]> ---
I'm of two minds on this... I always understood these properties as "should the
form impose these restrictions or not". Setting them to "Yes" does not
guarantee that these actions will work out in the end: the Database may not
allow them because the user does not have the required permissions, LibreOffice
may not be able to carry them out (e.g. because no primary key), ...

To me, it makes sense to keep these settings as such, orthogonal from the
issues that may keep these actions from succeeding in practice. Frim this POV,
this is not a bug.

OTOH, I kinda understand from a beginner-friendly POV that allowing the user to
set a non-meaningful setting that will have no effect in practice is only
confusing. From this POV, this is a valid enhancement request.

Oh well, if anyone feels like preparing a patch... let's see.

The code that decides whether a given propery is enabled or not is in file
extensions/source/propctrlr/formcomponenthandler.cxx; look for
_rxInspectorUI->enablePropertyUI calls. You'll need to add a case in
FormComponentPropertyHandler::actuatingPropertyChanged for everything that may
change the decision whether to enable or not, and there add
PROPERTY_ALLOWADDITIONS, DELETIONS and EDITS to aDependentProperties.

Then add a case to
FormComponentPropertyHandler::impl_updateDependentProperty_nothrow
for PROPERTY_ALLOWADDITIONS, DELETIONS and EDITS to make the actual decision to
enable or disable. For that, I think you just have to read out the underlying
RecordSet's "Privileges" property and test whether it includes
com::sun::star::sdbcx::Privilege::DELETE/INSERT/UPDATE

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to