ioBroker.js-controller icon indicating copy to clipboard operation
ioBroker.js-controller copied to clipboard

Enhance object checks: types user, adapter, group common.name only string

Open Apollon77 opened this issue 4 years ago • 8 comments

Currently the "common.name" property can be a strin gor an object (with localized strings). Currently we accept both types for all objects.

In fact the objects of types user, adapter and group that are created by users should never have a name object property. Exception are the user and group objects created by the js-controller io-package (so disable the strict-checks when creating them)

Apollon77 avatar Mar 31 '21 19:03 Apollon77

Curiosity: What type adapter objects are user created?

foxriver76 avatar Mar 31 '21 19:03 foxriver76

Right, normally none :-)

Apollon77 avatar Mar 31 '21 21:03 Apollon77

for type adapter it always needs to be a string according to our schema.

foxriver76 avatar Apr 01 '21 14:04 foxriver76

for type adapter it always needs to be a string according to our schema.

exactly

Apollon77 avatar Apr 01 '21 17:04 Apollon77

Existing problem: If someone adds a user to a group, or make changes on user/group, admin will rewrite the name as it is and only write the string name if really the name has changed. Thus, the warning gets generated if a user makes such a change.

foxriver76 avatar Jan 05 '22 09:01 foxriver76

For adapter this is not a problem

foxriver76 avatar Jan 05 '22 09:01 foxriver76

See #1645

foxriver76 avatar Jan 05 '22 09:01 foxriver76

So how we want to proceed here in the long run? allow both or make adjustments in admin so that the name will be set according to the configured language.

foxriver76 avatar Sep 03 '22 00:09 foxriver76