mhustler Posted May 2, 2008 Share Posted May 2, 2008 Is there a way to change the default privileges for created objects in JasperServer? I would like to configure reports and report options to be created with default privileges such that only the creator and the administrators have RW access. Link to comment Share on other sites More sharing options...
anandharaj Posted May 2, 2008 Share Posted May 2, 2008 When you create a new report / objects - it will follow the parent object's permission as default. Link to comment Share on other sites More sharing options...
ankurcpatel Posted January 7, 2011 Share Posted January 7, 2011 I have extended the JS base code in my own customizations project to alter the default behavior for saving report options. My implementation has the same requirement as the original author's organization where only the creating user and superusers should only have access to their own saved objects. Link to comment Share on other sites More sharing options...
waalp Posted October 3, 2011 Share Posted October 3, 2011 ankurcpatel , Could you please give a starting point for what you did in the JS Base code. We are trying to achieve the same for the report options, but at this time have no idea where to start. Greetings,Peter Link to comment Share on other sites More sharing options...
ankurcpatel Posted October 3, 2011 Share Posted October 3, 2011 Hi,I wrote a static method in a new custom class which accepts a Resource object (the base class of all JS objects such as report units, saved input control values, topics, ad hoc reports, folders, scheduled report output, etc...) and sets the permissions on that object. Look in the JS documentation - namely the JasperServer Ultimate Guide - under the section for "Object Permissions API" for some example code.Permissions can be set on a object in two ways - role-based and user-based. You specify which one in your call to the method setPermissionRecipient in the ObjectPermission class. You'll see this in the documentation. Calling setPermissionMask allows you to specify the permission you want to set. The values you can enter here are:0 for NO_ACCESS2 for READ_ONLY18 for READ_DELETE30 for READ_WRITE_DELETE1 for ADMINISTERThese values are listed in one the objPermissionToRole.jsp and objPermissionToUser.jsp files in the projectAfter you write your method, you will need to find the integration points within the code base for each resource type. In other words, you will need to look for where each of the resource types are being saved or copied and then call your custom method to change the default permissions.Hope this helps... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now