User
In some scenarios you end up creating the accounts. You probably have to create a Group and a User attached.
id
Adelya Internal object ID - no insert/no update
Alphanumeric (even if yet just number are in), it's the table primary key, returned on persist or use for fast look-up
idExternal
Your reference
text
255 characters max
group
Who "owns" this component
gender
Mr or Mrss ?
alpha : M, MME, MELLE, COMPANY, COUPLE
127 characters max
name
Alpha
127 characters max
firstname
alpha
127 characters max
email
according to rfc
127 characters max
tel
according to E164 from ITU
64 characters max
mobile
according to E164 from ITU
64 characters max
login
Must be unique system wise
alpha
255 characters max, mandatory
password
Password. This field is not returned anymore, but you can use it to set a new value (will be hashed and salted on save)
Alpha
255 characters max
role
user role
ADMIN, AUTHOR, BADGER, VISITOR, PUBLIC (default)
uid
rfid card number
alpha (see information about usage of cardnumber / uid for cards Cards)
64 characters max
cardnumber
card number
alpha (see information about usage of cardnumber / uid for cards Cards)
64 characters max
confirmed
ULA ok ?
boolean default false
forwardMessageByEmail
if true, every notification will be forwarded on the user email
boolean, default true
forwardMessageBySMS
if true, every notification will be forwarded on the user mobile
boolean, default false
Example
Listing the valid user of my group
GET
{
"User":{
"confirmed":true
}
}
Example
Creating a new user on sub group (using idExternal).
A note on security : if you create a user, you will not be able to give more right than the ones you have.
PUT
{
"User":{
"gender":"M",
"name":"new user",
"firstname":"Alain",
"login":"the login",
"password":"the password in clear",
"role":"ADMIN",
"email":"support@adelya.com",
"actif":1,
"forwardMessageByEmail":true,
"group":{
loadFromKeys: { idExternal: "here the idext of my group"}
}
}
}