Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(ORG-8018)

Project Protection and Admin Mode

Table of Contents
minLevel2

LabTalk commands to enable various protections on worksheets and workbooks have been introduced in Origin 9.1. Further modemore, Admin mode has been introduced to allow better protection controls on Origin projects. You may control protection attributes of Origin object (like a book) without involving Admin mode, but such protection is not secured, anyone can run LabTalk command to remove these protections. To ensure secured protection, you must setup Admin password for the Origin project and then Origin Object protections cannot be altered until the correct password is entered. Very often, security is not an issue and you may just want to prevent inadvertent or accidental modification or delete of certain book or sheet, and in such situation, you may add protection without Admin password, which certainly make things easier, not having to remember a password on given OPJ.

...

You can use the following labtalk commands to look lock a sheet of a book. If Admin password has not been set, these commands will work fine. Once Admin password is set, then you must login first before using these commands.

...

 print out the current protection flags
CommandDescription          Examples       

layer -lw n

set worksheet write access flags

lay -lw hex(82);//set active sheet to protect data and structure

lay -lw;//protect everything

lay -lw 2;// protect only data

lay -lw hex(180);//no insert/del col/rows, no worksheet rename

lay -lw 0;//remove all the protections on the current sheet

layer -lt print out current protection flags 
page -lw nset workbook write access flags

 //the following will prepare the book for locking active sheet but allow analysis results added to book

lay -lw hex(582);//no del, no rename, no add/insert/move col/rows, no edit

page -lw hex(400);//no del book

 

 page -lt

//other examples

page -lw;//lock book and all sheets, nothing can be change changed and cannot delete book or sheets

page -lw hex(400);//prevent user deleting the book

page -lw; //lock the book completely, cannot even delete

page -lw hex(482); //lock delete, structure change and data edit

 page -lt print out the current protection flags 

 

Exclusion Zones on Read-Only Sheet

...

Please note that you can only make Exclusion Zone modification when the sheet is unprotected. So to set the sheet up as a form, you should first add all the needed Exclusion Zones, then protect the sheet from medication modification with lay -lw hex(82); for example. 

...

The following is a listing of the currently supported doc commands control the Admin mode. Text inside square brackets indicateis optional.

...

CommandDescription     Examples        
doc -pwa [password]

Add Admin password password to the project. You will still need to login after adding password to turn on Admin mode.

When you do not specify a password, then "origin" is assumed. Not using password will help situation where security is not so much of a concern and not running the risk of forgetting the password used.

doc -pwa

doc -pwa test

doc -pw [password]login with password, if no Admin password added yet, error message will be shown

doc -pw;

doc -pw test;

doc -pwxlogout, once logout, cannot change anything related to protections 
doc -pwtalist all the book/sheets with protection turned on 
doc -pwr [password]remove password, if no password specified, then must login first to do so, otherwise must give correct passworddoc -pwr;

...