sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

Add ability to add new fields for the user resource #197

Closed arkadiusz-wieczorek closed 9 years ago

arkadiusz-wieczorek commented 9 years ago

Why resource_type.user.js has two username declaration?

var user = new Sealious.ChipTypes.ResourceType({
    name: "user",
    fields:[
        {name: "username", type: "text", required: true},
        {name: "email", type: "email"},
        {name: "password", type: "text", required: true},
        {name: "status", type: "text"},
        {name:"username", type:"text"}
    ]
});
kuba-orlik commented 9 years ago

Woah, that's an oversight, this shouldn't be like that. The second declaration should be deleted. Also, any future duplicate fields should be detected, I've set up an issue for that - https://github.com/Sealious/Sealious/issues/213

kuba-orlik commented 9 years ago

Removed the duplicate field in 098093714915

arkadiusz-wieczorek commented 9 years ago

I have an idea. Developer would be extend ResourceType: user in index.js. If he won't do this then ResourceType would have default fields only username and password otherwise ResourceType would have all fields which Developer adds (extends) in index.js.

kuba-orlik commented 9 years ago

I think it's a good idea. imo this should be even possible for every resource-type, not only user :)

arkadiusz-wieczorek commented 9 years ago

Currently we have no other resource-type hence my indication.

kuba-orlik commented 9 years ago

https://trello.com/c/TtIknSXZ/13-enable-extending-resource-type-for-users