Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding personal restriction section on System Administration

Status
Not open for further replies.

SenadSe

Programmer
Dec 2, 2011
28
BA
i am trying to add an personal restriction section on System Administration like described on the picter below.
Its foe my modul , which is an function on the function menu.

what should i orphan, or how do i fint what i should orphan?




restriction.png


I searched this on the forum , but it seems no one asked till now.
 
This is what they teach at the the builder fundamentals.Your first area is restriction based on subtypes.To know how to do that open up a known subtype like Channel .Go into Channel->LLNodes and look at the flag called .fObjectFactory.That is how livelink knows if a node needs to be permissioned based on livelink groups/users.Obviously you cannot restrict something if you did not create your own subtype.In programming oscript llnode stands for the node implementation and is customarily the same as the webnodes.Look at the Documentation object for llnodes and then webnodes.
Second one is very similar but done on EventScripts,Collection et al.It si not as easy as the first one but one you understand builder enough and look at Ot code you should be able to do that as well.If you really get stuck ask.Is it a webnodecommand or action object that you are trying to secure


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Its an WebNodeAction/WebNodeCMD action. So i think it can not have a subtype number (bcos its not an item? ).

I am trying to add the restriction to the second section of the page.

My idea was something like orphaning an item like there is :
1)WEBLL:WebLL Root:IndexCallback:LivelinkIndexCallback
-for adding a section to the About Livelink Page
2)WEBADMIN:AdminIndexCallback
-for adding a section to the Livelink Administration Page .

Does this exist or do i have to code it by myself?
 
Not sure if this is the right way to help as I did not learn oscript thru screencaps :).I learned this following the addressbook module,wrote a lot of code and then took OT training.I am doing you a lot of disservice by providing this.But the thing that you want can easily be understood by looking at an existing implementation.

The way would be like this for a webnode command.

1-Set .fPerms in your 0 Setup script with a positive number
2-Create 3 new features called exactly FactoryName,FactoryType and fObjectfactory.These do not exist in the webnode cmd object.
3)Override SubClassIsEnabled and add this code
Code:
Boolean ok = $LLIApi.FactoryUtil.IsCreatable( prgCtx, { $TypeDocument } )
	
	
	return ok
4)override _SubclassInit() and add this code
Code:
if .fObjectFactory
		$LLIAPI.ObjectFactorySubsystem.RegisterItem( this, { $TypeDocument } )
	end
5)_NodeTypes should contain 144 for testing

6)factoryName can have this code
Code:
Function String FactoryName()
	
	
	return( "APPU COMMAND1")
end
7)FactoryType() can have this code
Code:
Function String FactoryType()


	return( "APPU COMMAND" )
end

I did this on the playing module called addressbook which I have uploaded here in case you want to look at what I have done.

Once again try to understand the object creation and lifecycle of the oscript objects as if you do not understand it you are going to create leaky code.
I will remove the module from public view soon as I did this in basically 10 to 15 minutes without giving it much thought :)


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
For now i have 'mastered' the tutorial where the addressbook module is made, i have done it few times and understand the procedure of making a module and functionality, Also i have learned the fundamentals out of the PDF , builder fundamentals and did some modules on my own. For now i have no chance to take OT training or courses.

I tried your code you provided in the post above, but i think this is not what i want. What i am trying to do is to add the functionality for administrators. The administrator should be able to allow or restrict the usage of my module (my action) for some users or user groups. Like administrator can restrict the Move/Copy thing by editing the Group: Move/Copy ({6,{1,2}}).



PS
since your addressbook module is uploaded on the knowledge base, it can not be viewed or downloaded by those who have not the username and pass for the knowledge base. For me, it doesn't matter, i have tried your code on my module, but i think it is not doing what i want.

Thx in any case

 
You say you understand oscript code. The code snippet I made and showed you happened on the subtype=144.In english the code shows you how the 'appu command1' can be made available to users who has that eligibility by a person who has SA rights to get into the admin.index page.Based on the screen cap you posted I showed you how the action part of that screen not sub type.I looked at existing OT code of how they show who can see the 'Make Redition' command button.
You will get more and more experienced by looking at OT code and you should be able to do justice to whatever you are doing.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
If you want to add the section to the Admin page that you have shown in your screenshot you will need to add a WebLingo override, ideally via CustomizationsRT, see and for examples.

This should get your configuaration data in, and then you can use it in support of your WebNodeCmd as AppNair has shown above.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Thanks Greg for providing me comfort saying that is the way you would do it as well.none of the 4 screen shots in the poster's actually ask how to add a link to admin.index page.I thought what he was asking was subtype restrictions or command button type,or event script kind of restrictions.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
I think what he is trying to do is as follows :

1. Add some more content to the Admin page to define his additional restrictions.
2. Create a new webnode command in his module as required
3. use the rules defined in 1 to drive functionality in 2.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top