Managing Role using web servicesManaging Role using web serviceshttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1150781312024-03-28T20:26:23Z2024-03-28T20:26:23ZRE: Managing Role using web servicesFederico Aleottihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1150868842019-09-04T12:42:44Z2019-09-04T12:42:44ZThank you, I've checked the database and fixed the records and now Liferay is displaying the new roles.Federico Aleotti2019-09-04T12:42:44ZRE: Managing Role using web servicesChristoph Rabelhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1150808642019-09-04T09:12:11Z2019-09-04T09:12:11ZI tried to do "rolemanagement" using the jsonws api too in Liferay 6. But our usecases could not be implemented since the remote API is to limited. It is simply impossible to set permissions on entities since some of the required parameters are not marked with the @JSON annotation and therefore not available when e.g. a journalarticle is fetched.<br />We implemented our own rest services and used the *LocalService methods in them. It really paid off to do that, it was easier to implement and the interface became a lot cleaner. We used the Fake Entities approach in Liferay 6 (There's a very helpful blog post about it by David describing it). With Liferay 7 we didn't need that workaround anymore and simply implemented our own rest services (there is a blade/IDE rest module template) for "everything" we needed and completely ignored the jsonws api afterwards.Christoph Rabel2019-09-04T09:12:11ZRE: Managing Role using web servicesDavid H Nebingerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1150818152019-09-03T19:22:22Z2019-09-03T19:22:22Zyou left out some details, but my guess is that whatever values you're using for the className and classPK values do not correspond with what the UI is requesting when getting roles to display.<br /><br />After all, if you inject junk into your database, you can't expect Liferay to treat it like real data.<br /><br />If you're having problems figuring out the values to use, take a look at a role in the DB to see what class names and PKs are used. Note, however, that keys can be different across different Liferay environments, so don't assume that a PK value of 5 from one environment matches in every other environment.<br /><br />AFAIK there is no way to enable specific permissions within roles. I think it is too dependent upon defined permissions in the environment itself and not necessarily subject to external retrieval.David H Nebinger2019-09-03T19:22:22ZManaging Role using web servicesFederico Aleottihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1150781302019-09-03T14:57:23Z2019-09-03T14:57:23ZHello,<br />I'm trying to create roles using jsonws api called by a Java application that run on a different location from the liferay installation. I managed to create new roles using the url syntax <br />/api/jsonws/role/add-role?className=className&classPk=5&name=name5&titleMap{"en_US":"title"}&descriptionMap{"en_US":"description"}&type=1&subtype=sub<br />Whilst the role is created successfully it doesn't appear in Liferay's roles menu, but using the api I can find it with the roleId. <br />I've also managed to add the created role to a user using the api, but still I can't see it from Liferay's interface.<br />Moreover I can't fig