创建profile.docx
- 文档编号:23572097
- 上传时间:2023-05-18
- 格式:DOCX
- 页数:15
- 大小:780.23KB
创建profile.docx
《创建profile.docx》由会员分享,可在线阅读,更多相关《创建profile.docx(15页珍藏版)》请在冰豆网上搜索。
创建profile
CreatingnewProfiles
创建新的配置文件
Thisdocumentexplains,stepbystep,howtocreateyourowniTopmoduleinordertocreatenewprofilestograntaccesstotheiTopapplication.
本文档说明,一步一步,如何创建自己的ITOP模块,以创造新的配置文件来授予ITOP应用访问权限。
Goalsofthistutorial本教程的目标
Inthisstep-by-steptutorialyouwilllearnto:
在这一步一步的教程你将学习:
•createyourownextensionmoduleforiTop2.0创建您自己的扩展模块iTop2.0
•definenewprofilesforiTop定义新的配置文件ITOP
•on-boardthenewprofilesbyrunningthesetupagain加载新的配置文件通过再次运行安装
Forthepurposeofthistutorialwewillcreatetwonewprofiles:
对于本教程,我们将创建两个新的配置文件
•Acompleteread-onlyprofile,whichgrantstheuserstherightstobrowsethroughtheapplication,butnottochangeanythinginiTop
一个完整的只读配置文件,授予了用户浏览应用程序权利,而不是在iTop改变任何东西
•Aread-onlyprofilesimilartothe“Portaluser”profilewhichgrantstheusersenoughrightstobrowsethroughthenormaliTopapplicationinread-onlymodeformostclassesbutalsotousethePortalforsubmittingUserRequests.
一个只读文件类似于“门户用户“文件授予了用户足够的权限来浏览应用程序的正常iTop在只读模式对于大多数类但也使用门户提交用户请求。
Whatyouwillneed你需要什么
•iTopinstalledonadevelopmentmachine,onwhichyoucaneasilyaccess/editthefiles.
iTop安装在开发机器上,您可以很容易地访问/编辑文件。
•AtexteditorcapableofeditingPHPandXMLfileandsupportingUTF-8.OnWindowsyoucan
useWordpad(NotepaddoesnotlikeUnixlineendings)oroneoftheexcellentfreedevelopmentIDEslikePSPadorNotepad++.
一个文本编辑器能够编辑PHP和XML文件和支持utf–8用写字板(记事本不喜欢Unix行结尾的),或者一个优秀的自由发展的IDEPSPad或记事本等。
Customizationprocess定制过程
Thecustomizationprocessisthefollowing:
定制过程如下:
1.InstalladevelopmentinstanceofiTop.Itisalwaysbetternottoexperimentinproduction!
!
安装一个开发实例的iTop。
它总是最好的在生产实验!
!
2.Installthetoolkittoassistyouinthecustomization
安装工具包来协助你定制
3.Createanew(empty)moduleusingthemodulecreationwizard
创建一个新的(空)模块使用模块创建向导
4.CopythisnewmoduletotheextensionsfolderoniTopandrunthesetupagaintoinstalltheemptymodule
3.复制这个新的模块来扩展文件夹,运行安装iTop再次安装空模块
5.Modifythemoduleinextensionsandusethetoolkittocheckyourcustomizations
5.修改模块的扩展和使用工具箱来检查你的定制
6.Runthesetupagaintocreatethenewprofile(s)
再次运行安装创建新的配置文件
Repeatthelasttwopointsuntilyouaresatisfiedwithyourcustomization.Whenyouaredone,yournewmoduleisreadytobedeployed.CopythemodulefolderintheextensionsdirectoryonyourproductioniTopinstanceandrunthesetuptoinstallit.
重复最后两个点直到您满意您的定制。
当你完成了,你的新模块准备部署。
复制模块文件夹在扩展目录在你的生产iTop实例并运行安装安装它。
Stepbysteptutorial一步一步的教程
Createyourcustomizationmodule创建您的定制模块
Usethemodulecreationwizard.Filltheformwiththefollowingvalues:
使用模块创建向导。
填表用以下值:
Label标签
Value数值
Remarks备注
Modulename
模块名
sample-add-profile
样品-添加–文件
Namesstartingwithitop-andcombodo-arereservedforusebyCombodo.Itisrecommendednottoputspacesoraccentuatedcharactersinthenameofthemodule.Twomoduleswiththesamenamecannotco-existinthesameiTopinstance.名字从itop-和combodo——是留给combodo使用。
建议不要将空格或加重了角色在该模块的名称。
两个模块具有相同名称的不能共存在同一iTop实例。
ModuleLabel
AddProfileSample
模块标签
AddProfileSample
Thislabelwillbedisplayedinthesetupwizard.Localizedcharactersandspacesareallowed
ModuleVersion
1.0.0
Theconventionistousea3digitsnumberingscheme:
X.Y.Z
Category
business
business
Modulesthatprovidemodificationstothedatamodelshouldbeinthecategory'business'
Dependencies
itop-profiles-itil/1.0.0
Ourcustomizationmoduledependsonthemodules:
iTopProfilesITILsincewewillbeusingthegroupsdefinedinthismodule.Notethatthismoduleretainedtheversion1.0.0eveniniTop2.0!
!
ClickGenerate!
todownloadtheemptymoduleasazipfile.
Installtheemptymodule
ExpandthecontentofthezipintotheextensionsfolderofyourdevelopmentiTopinstance.Youshouldnowhaveafoldernamedsample-profile-classinsidetheextensionsfolder.thisfoldercontainsthefollowingfiles:
•datamodel.sample-add-profile.xml
•module.sample-add-profile.php
•en.dict.sample-add-profile.php
•model.sample-add-profile.php
Makesurethatthefileconf/production/config-itop.phpiswritableforthewebserver(onWindows:
rightclicktodisplaythefilepropertiesandunchecktheread-onlyflag;onLinuxchangetherightsofthefile),thenlaunchtheiTopinstallationbypointingyourbrowsertohttp:
//your_itop/setup/
Click“Continue»”tostartthere-installation.
Makesurethat“Updateanexistinginstance”isselectedbeforeclicking“Next»”.
Continuetothenextstepsofthewizard…
Yourcustommoduleshouldappearinthelistof“Extensions”.Ifthisisnotthecase,checkthatthemodulefileshavebeencopiedintheproperlocationandthatthewebserverhasenoughrightstoreadthem.
Selectyourcustommodulebeforeclicking“Next»”andcompletetheinstallation.
DeclarethenewProfiles生明新的配置文件
Usingyoufavoritetexteditor,openthefiledatamodel.sample-add-profile.xml.
Insidetheuser_rightstag,addthefollowingpieceofXML:
type="write">allow type="delete">allow UserRequest"> type="stimulus">allow type="read">allow type="bulkread">allow type="read">allow type="bulkread">allow ThisinstructsiToptodefinetwonewprofiles. •Thefirstprofile(numberedid=“50”)isactuallyacloneofthe“PortalUser”profile.Theonlydifferenceisthat“PortalUser”isaconventionalnameforaprofile.Anyuserwhichhasthe“PortalUser”profileisautomaticallydirectedtotheportalinterfaceofiTop.Sinceournewprofileisnamed“Read-OnlyExceptRequests”,userswiththisprofileareallowedtonavigatethroughthestandarduserinterfaceofiTop. •Thesecondprofile(numberedid=“51”)isapureread-onlyprofile: itallowsonlytobrowsethroughiTopbutnottochangeanything. Theprofilesaredefinedbyaccumulatingrightsonagivensetofclasses-listedin“groups”.Byconventionthegroupwithid=“*”means“anyclass”.Theothergroupsusedinthisexamplearethegroupsalreadydefinedinthemodule“itop-profiles-itil”(youcanseetheirdefinitioninthefiledatamodel.itop-profiles-itil.xml). Forexamplethegroup“Portaluser-write”isdefinedasfollows: Thisgroupisusedtograntrightsontheclasses: FileDoc(afiledocument),UserRequest(auserrequestticket)andalsolnkTicketToDoc(then: nrelationbetweenaDocumentandaTicket).Inordertolettheend-usercreateaUserRequestticket(andattach/detachdocumentstotheticket),theprofile“Read-OnlyExceptRequests”mustgrantwriteaccesstoallclassesinthisgroup(Thereadaccessisgrantedbytheruleonthe“*”group). RefertotheXMLreferencedocumentationformoreinformationabouttheXMLsyntaxforgroupsandprofiles. Sincewedon'tneedtoredefineanygroupofclasses,thedatamodel.add-profile-sample.xmlfileshouldcontainonlythefollowing: datamodel.sample-add-profile.xml xmlversion="1.0"encoding="UTF-8"? > xsi="http: //www.w3.org/2001/XMLSchema-instance"version="1.0"> type="write">allow type="delete">allow UserRequest"> type="stimulus">allow type="read">allow type="bulkread">allow type="read">allow type="bulkread">allow Checkyourmodificationbyrunningthetoolkit.Pointyourbrowsertohttp: //your_itop/toolkit. Ifanyerrorisreportedatthisstage,fixitbyeditin
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 创建 profile
![提示](https://static.bdocx.com/images/bang_tan.gif)