#1 2018-12-13 08:23:14

hardik.pandya
Member
Registered: 2018-12-06
Posts: 12

Write Protect

Dear Team,

How to remove write protect in the report variants.

Version: 3.0.5

Regards,

Hardik Pandya

Offline

#2 2018-12-13 10:02:02

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,004
Website

Re: Write Protect

Hi Hardik,

in 3.0.5 the mask for setting/unsetting write/configuration protection is not shown. This is a bug and will be corrected in 3.0.6 (RS-3226).

In the meanwhile, you can set/unset the write/configuration protection per script. We will post a script in this thread later today that sets/unsets this mask for a variant.

Regards,
Eduardo

Offline

#3 2018-12-13 13:39:55

Rodion
Member
Registered: 2017-05-17
Posts: 14

Re: Write Protect

Hey Hardik,

here comes the workaround for your issue.
Please set the ids of the reports you want to change the protection.
This code provides you also the ability to change the configuration protection. You can uncomment it if you want.

Execute the code in the terminal.

package net.datenwerke.rs.dashboard.server.dashboard;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import net.datenwerke.rs.core.service.reportmanager.ReportService;
import net.datenwerke.rs.core.service.reportmanager.entities.reports.Report;

import com.google.inject.Inject


ReportService reportService = GLOBALS.injector.getInstance(ReportService.class);
ChangeProtection c = new ChangeProtection(reportService)

c.run()

/* this class handles the ticket TI-631
 * and changes the Write/Configure protection for reports
 */
public class ChangeProtection {
	
	private ReportService reportService;
	
	
	// USER SETTINGS \\
	
	// important! : add "L" at the end
	private Set<Long> reportIDs = new HashSet<>(Arrays.asList(75981L));  // you have to set your reportIDs here 
	
	boolean flag = false;
	
	// ------------- \\

  	@Inject
	ChangeProtection(ReportService reportService){
		this.reportService = reportService;
	}
	
	public void run(){
      Report node;
		for(Long id : reportIDs){
			node = reportService.getReportById(id);
          	//node.setConfigurationProtection(flag);
			node.setWriteProtection(flag);

		}

	}

}

Regards,
Rodion

Offline

#4 2019-01-02 14:14:39

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,004
Website

Re: Write Protect

Hi Hardik,

this issue has been fixed and will be available with reportserver 3.0.6, available at the end of january. Until then, please use scripting as a workaround as stated above.

Regards,
Eduardo

Offline

#5 2019-03-13 10:53:07

eduardo
Administrator
Registered: 2016-11-01
Posts: 1,004
Website

Re: Write Protect

Hi Hardik,

ReportServer 3.0.6 is released and this is available now as you can read in the release notes: https://reportserver.net/releasenotes/RS3.0.6.html

RS-3226    Bug    Variant "Properties", "Report Properties" and "Metadata" tabs are not being shown and cannot be edited, including write and configuration protection.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB