Skip to main content
1-Visitor
October 7, 2020
Solved

Assign Permissions programmatically in Java

  • October 7, 2020
  • 1 reply
  • 871 views

Dear devs, 

 

I am having some troubles in assigning certain permissions via code, just like I do in the composer.

 

For example, from the Composer I am able to assign permissions right to the Collections, but I struggle to understand how to achieve the same with the Extensions SDK.

 

Thanks for the help!

 

Best answer by Raccone

I have solved this, you can use:

 

CollectionsServices cs = new CollectionsServices();
		
try {
 cs.AddCollectionVisibilityPermission("Things", org.getName(), "Organization");
} catch (Exception e) {
 e.printStackTrace();
}

1 reply

Raccone1-VisitorAuthorAnswer
1-Visitor
October 7, 2020

I have solved this, you can use:

 

CollectionsServices cs = new CollectionsServices();
		
try {
 cs.AddCollectionVisibilityPermission("Things", org.getName(), "Organization");
} catch (Exception e) {
 e.printStackTrace();
}