gplsek / fitmoostore

fitmostore
GNU General Public License v2.0
0 stars 0 forks source link

add user roles #15

Closed gplsek closed 10 years ago

gplsek commented 10 years ago

Add user roles to create and edit user

when fitmoo creates a user for seller they will add the user_role:Store Owner http://fitmoo.plsekwerks.com/admin/people/permissions/roles/edit/4

this user has permosions to create and update products

jg77merten commented 10 years ago

POST http://fitmoostore.loc/fit_store/user Content-Type: application/json { "name": "test2", - user name "pass": "test2", - user pass "status":"1", - user status (0- blocked, 1 active) "notify":"1", - notify user about registering by mail "mail":"aaaaa@gmail.com", - mail "roles":{"4": "4"} - user role (where :) } -- response -- {"uid":"23","uri":"http://fitmoostore.loc/fit_store/user/23"}

jg77merten commented 10 years ago

----UPDATE CALL---- PUT http://fitmoostore.loc/fit_store/user/23 X-CSRF-Token: jOfQK2IcJX_5m5wuAg1DdtOcYAgM-uTz0jDZuQGcZho Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=hcsd26okRg8GeQikMZSDNm3mFezTHEdjk_RCDCBZaHQ Content-Type: application/json { "name": "test2", "current_pass": "test2", "roles":{"3": "3"} } --RESPONSE-- {"name":"test2","current_pass":"test2","roles":{"3":"3"},"uid":"23"}