Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

(ORG-8018) Project Protection with Admin Password

We have introduced the concept of Admin Mode to the Origin Project, with an Admin password. Once a project is protected by a password, worksheet and workbook protection features can be accessed only after user has logined with the admin password. We have also added LabTalk access to protect books and sheets.

App Title Bar Indication of Admin Mode

Normally, Origin title bar looks like this

 

there is a "-" that separates the 32/64 bit and the path of the file. To save space, we are just changing this "-" character to indicate Admin status.

For OPJ file that has added Admin password, the "-" character will be replaced by the "@" character before you enter the Admin password to login, like this

After login, the "@" character is replaced by the "=" character, like this

Admin Mode LabTalk Commands

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


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;

After a command is entered, you App title will change accordingly, so will the status bar to indicate current status.

Protection Flags

 Various objects like worksheet, workbooks can be assigned different protection flags. These flags are listed in the following table

Hex Value

Description
2Data: This include all the cells in a worksheet, data cells or label cells
4Style: Display style, like the color of the cell, or the cell formatting, this is currently not yet fully implemented
10Formula: Column Formula, Analysis Operation, Codes attached to Project etc. 
80Structure: This include like the number of rows and columns in a worksheet. inserting, deleting etc. 
 400 Delete: Prevent the object from being deleted

Protection Commands

You can use the following labtalk commands to look 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.

Multiple protection flags can be combined as can be seen in the examples.

There is a general inheritance rule on protection flags. Once you set protection on a book, then all sheets inside the book will inherent the flags from the book.

 

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 0;//remove all the protections on the current sheet

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

page -lw;//lock book and all sheets, nothing can be change 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

  • No labels