rotty3000/liferay-portal — pull request #51 by topolik (2012-04-17 22:44:32+00:00)
Title: LPS-26705 Added checks for groupIds, organizationIds, roleIds and userGr...

...oupIds inside UserServiceImpl.checkAddUserPermission

Also disabled jsonws.web.service.public.methods= in the portal.properties by default

----

Hi Ray,

for testing purpose please enable jsonws.web.service.public.methods=* in portal.properties. Then you can test it using the JSON WS calls below (should throw PrincipalException now).

Thank you!

----

Assuming companyId=1:

// some User's Group with id 95
groupIds=95
http://localhost:8080/api/jsonws/user/add-user?groupIds=95&organizationIds=&roleIds=&userGroupIds=&formDate=1334698683484&companyId=1&autoPassword=false&password1=xxx&password2=xxx&autoScreenName=false&screenName=xxx3&emailAddress=xxx3%40liferay.com&facebookId=0&openId=&locale=&firstName=xxx&middleName=xxx&lastName=xxx&prefixId=0&suffixId=0&male=true&birthdayMonth=0&birthdayDay=1&birthdayYear=1970&jobTitle=&sendEmail=true

// some Organization with id 22
organizationIds=22
[http://localhost:8080/api/jsonws/user/add-user?groupIds=&organizationIds=22&roleIds=&userGroupIds=&formDate=1334698683484&companyId=1&autoPassword=false&password1=xxx&password2=xxx&autoScreenName=false&screenName=xxx3&emailAddress=xxx3%40liferay.com&facebookId=0&openId=&locale=&firstName=xxx&middleName=xxx&lastName=xxx&prefixId=0&suffixId=0&male=true&birthdayMonth=0&birthdayDay=1&birthdayYear=1970&jobTitle=&sendEmail=true]

// admin Role with id 15
roleId=15
http://localhost:8080/api/jsonws/user/add-user?groupIds=&organizationIds=&roleIds=15&userGroupIds=&formDate=1334698683484&companyId=1&autoPassword=false&password1=xxx&password2=xxx&autoScreenName=false&screenName=xxx3&emailAddress=xxx3%40liferay.com&facebookId=0&openId=&locale=&firstName=xxx&middleName=xxx&lastName=xxx&prefixId=0&suffixId=0&male=true&birthdayMonth=0&birthdayDay=1&birthdayYear=1970&jobTitle=&sendEmail=true

// some UserGroup with id 10400
userGroupId=10400
http://localhost:8080/api/jsonws/user/add-user?groupIds=&organizationIds=&roleIds=&userGroupIds=10040&formDate=1334698683484&companyId=1&autoPassword=false&password1=xxx&password2=xxx&autoScreenName=false&screenName=xxx3&emailAddress=xxx3%40liferay.com&facebookId=0&openId=&locale=&firstName=xxx&middleName=xxx&lastName=xxx&prefixId=0&suffixId=0&male=true&birthdayMonth=0&birthdayDay=1&birthdayYear=1970&jobTitle=&sendEmail=true