users.xml change outside basex
Hi,
it seems all of users.xml will be rewritten on changes. I just tried to add a <groups> element next to <users>.
Any way to preserve changes in the users.xml ? Maybe allow for a <custom> section or similar?
By the way: what was the reason users.xml is not stored as a basex database but on the file system?
Regards,
Max
Quoted text · Maximilian Gärber · 2 lines
> Any way to preserve changes in the users.xml ? Maybe allow for a > <custom> section or similar?
Currently no. Maybe something like this could be added in a future version. Indeed I had similar thoughts in the past. One problem might be that this file is only parsed if BaseX is started (subsequent changes at runtime will be overwritten if the file is updated by BaseX). However, it could make sense to extend the User Module with a function for handling custom user data. How do you currently work with users?
Quoted text · Maximilian Gärber · 2 lines
> By the way: what was the reason users.xml is not stored as a basex > database but on the file system?
I wanted to keep BaseX initialization as simple and fast as possible.
Okay, then I'll most probably add a groups.xml file.
I use the database users as application users also. To make sure somebody cannot accidentally delete anything etc.
As well I am going to have to keep a record about file specific rights at application level.
Because of this I wanted to add the groups element.
Regards, Max
Quoted text · Christian Grün · 17 lines
Am 29.07.2016 17:04 schrieb "Christian Grün" <christian.gruen at gmail.com>: > > Any way to preserve changes in the users.xml ? Maybe allow for a > > <custom> section or similar? > > Currently no. Maybe something like this could be added in a future > version. Indeed I had similar thoughts in the past. One problem might > be that this file is only parsed if BaseX is started (subsequent > changes at runtime will be overwritten if the file is updated by > BaseX). However, it could make sense to extend the User Module with a > function for handling custom user data. How do you currently work with > users? > > > By the way: what was the reason users.xml is not stored as a basex > > database but on the file system? > > I wanted to keep BaseX initialization as simple and fast as possible. >
Hi Max,
I added some thoughts on a custom user section in GitHub [1]. Do you miss some critical info in the feature description?
Christian
Quoted text · Maximilian Gärber · 31 lines
On Fri, Jul 29, 2016 at 8:51 PM, Maximilian Gärber <mgaerber at arcor.de> wrote: > Okay, then I'll most probably add a groups.xml file. > > I use the database users as application users also. To make sure somebody > cannot accidentally delete anything etc. > > As well I am going to have to keep a record about file specific rights at > application level. > > Because of this I wanted to add the groups element. > > Regards, Max > > > Am 29.07.2016 17:04 schrieb "Christian Grün" <christian.gruen at gmail.com>: >> >> > Any way to preserve changes in the users.xml ? Maybe allow for a >> > <custom> section or similar? >> >> Currently no. Maybe something like this could be added in a future >> version. Indeed I had similar thoughts in the past. One problem might >> be that this file is only parsed if BaseX is started (subsequent >> changes at runtime will be overwritten if the file is updated by >> BaseX). However, it could make sense to extend the User Module with a >> function for handling custom user data. How do you currently work with >> users? >> >> > By the way: what was the reason users.xml is not stored as a basex >> > database but on the file system? >> >> I wanted to keep BaseX initialization as simple and fast as possible.
Written for BaseX 8.5. BaseX may have changed since: please check the current documentation.