Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kiosk mode #10

Open
3 tasks
markus2330 opened this issue Nov 19, 2019 · 3 comments
Open
3 tasks

kiosk mode #10

markus2330 opened this issue Nov 19, 2019 · 3 comments
Assignees

Comments

@markus2330
Copy link
Contributor

  • document metadata in doc/METADATA.ini (@darddan), ideally using restrict/write
  • implement in qt-gui
  • implement kconfig (handle metadata) (@FelixResch)
@markus2330 markus2330 changed the title kiosk in kconfig kiosk mode Nov 19, 2019
@darddan
Copy link
Collaborator

darddan commented Dec 2, 2019

about KConfig kiosk mode:
if a group ends with [$i] (which is the only meta allowed at groups, it is considered as an immutable group. What I didn't notice earlier, if this is added at an empty line, without a group name, it makes all the following groups immutable.

When a group is immutable, you can't add, remove or edit children. In Elektra, we should restrict to add/remove/edit immediate "children".

As far as I could understand. If we the restrict/write meta of a key to 1, we can't change this key itself, which isn't the same functionality. Should I add another meta immediate/children/restrict/write or something?

Also there is a global variable that disables the kiosk mode functionality, which could be added as debug mode in the qt-gui (similar to the Viewermode)

@darddan
Copy link
Collaborator

darddan commented Dec 2, 2019

To explain the immediate children logic, If we had a config file:

[group]
subgroup=1
[group][subgroup][$i]
entry=2
[group][subgroup][subsubgroup]
entry=3
  • The kdb set group/subgroup 5 should work. Even though both the entry and the restricted group have the same path (group/subgroup), the entry is considered to be in another group.
  • The kdb set group/subgroup/entry 5 shouldn't work because the group is immutable.
  • The kdb set group/subgroup/subsubgroup/entry 6 should work, even though in Elektra is mapped under an immutable "node".

@markus2330
Copy link
Contributor Author

As far as I could understand. If we the restrict/write meta of a key to 1, we can't change this key itself, which isn't the same functionality. Should I add another meta immediate/children/restrict/write or something?

Yes, such an extension will be required. But the prefix should stay the same so that similar meta data stays together. What about the name restrict/write/children/immediate?

Note that actually also for the currently defined restrict metadata no plugins exist. So your kconfig plugin needs not only to add the correct metadata when it finds $i but we also need a plugin that actually enforces all these restrictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants