Changeset 32f43b in indico
- Timestamp:
- 03/28/12 17:51:46 (14 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- 20016b
- Parents:
- a20e62
- git-author:
- Alberto Resco Perez <alberto.resco.perez@…> (03/16/12 17:20:42)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (03/28/12 17:51:46)
- Location:
- indico
- Files:
-
- 2 added
- 8 edited
-
MaKaC/common/info.py (modified) (3 diffs)
-
MaKaC/services/implementation/admin.py (modified) (3 diffs)
-
MaKaC/webinterface/pages/admins.py (modified) (2 diffs)
-
MaKaC/webinterface/rh/admins.py (modified) (1 diff)
-
MaKaC/webinterface/tpls/AdminProtection.tpl (added)
-
MaKaC/webinterface/tpls/ProtectionWidget.tpl (modified) (2 diffs)
-
MaKaC/webinterface/tpls/SessionBar.tpl (modified) (1 diff)
-
MaKaC/webinterface/urlHandlers.py (modified) (1 diff)
-
MaKaC/webinterface/wcomponents.py (modified) (2 diffs)
-
htdocs/adminProtection.py (added)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/common/info.py
rf0754f r32f43b 30 30 DEFAULT_API_USER_AGREEMENT = """In order to enable an iCal export link, your account needs to have a key created. This key enables other applications to access data from within Indico even when you are neither using nor logged into the Indico system yourself with the link provided. Once created, you can manage your key at any time by going to 'My Profile' and looking under the tab entitled 'HTTP API'. Further information about HTTP API keys can be found in the Indico documentation.""" 31 31 DEFAULT_PERSISTENT_USER_AGREEMENT = """In conjunction with a having a key associated with your account, to have the possibility of exporting private event information necessitates the creation of a persistent key.  This new key is also associated with your account and whilst it is active the data which can be obtained through using this key can be obtained by anyone in possession of the link provided. Due to this reason, it is extremely important that you keep links generated with this key private and for your use only. If you think someone else may have acquired access to a link using this key in the future, you must immediately remove it from 'My Profile' under the 'HTTP API' tab and generate a new key before regenerating iCalendar links.""" 32 DEFAULT_PROTECTION_DISCLAINER_RESTRICTED = 'Circulation to people other than the intended audience is not authorized. You are obliged to treat the information with the appropriate level of confidentiality.' 33 DEFAULT_PROTECTION_DISCLAINER_PROTECTED = 'As such, this information is intended for an internal audience only. You are obliged to treat the information with the appropriate level of confidentiality.' 32 34 33 35 #from MaKaC.common.logger import Logger … … 105 107 self._apiPersistentUserAgreement = DEFAULT_PERSISTENT_USER_AGREEMENT 106 108 109 self._protectionDisclaimerRestricted = DEFAULT_PROTECTION_DISCLAINER_RESTRICTED 110 self._protectionDisclaimerProtected = DEFAULT_PROTECTION_DISCLAINER_PROTECTED 111 107 112 108 113 def getStyleManager( self ): … … 511 516 def setAPIPersistentUserAgreement(self, v): 512 517 self._apiPersistentUserAgreement = v 518 519 def getProtectionDisclaimerProtected(self): 520 if not hasattr(self, '_protectionDisclaimerProtected'): 521 self._protectionDisclaimerProtected = DEFAULT_PROTECTION_DISCLAINER_PROTECTED 522 return self._protectionDisclaimerProtected 523 524 def setProtectionDisclaimerProtected(self, v): 525 self._protectionDisclaimerProtected = v 526 527 def getProtectionDisclaimerRestricted(self): 528 if not hasattr(self, '_protectionDisclaimerRestricted'): 529 self._protectionDisclaimerRestricted = DEFAULT_PROTECTION_DISCLAINER_RESTRICTED 530 return self._protectionDisclaimerRestricted 531 532 def setProtectionDisclaimerRestricted(self, v): 533 self._protectionDisclaimerRestricted = v 513 534 514 535 -
indico/MaKaC/services/implementation/admin.py
rd9e5b0 r32f43b 18 18 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 19 19 20 from MaKaC.services.implementation.base import AdminService 20 from MaKaC.services.implementation.base import AdminService, TextModificationBase 21 21 22 from MaKaC.services.implementation.base import ParameterManager 22 23 from MaKaC.user import PrincipalHolder, AvatarHolder, GroupHolder … … 190 191 return userFossil 191 192 193 class EditProtectionDisclaimerProtected (TextModificationBase, AdminService): 194 195 def _handleSet(self): 196 if (self._value ==""): 197 raise ServiceError("ERR-E1", 198 "The protected disclaimer cannot be empty") 199 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 200 minfo.setProtectionDisclaimerProtected(self._value) 201 202 def _handleGet(self): 203 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 204 return minfo.getProtectionDisclaimerProtected() 205 206 class EditProtectionDisclaimerRestricted (TextModificationBase, AdminService): 207 208 def _handleSet(self): 209 if (self._value ==""): 210 raise ServiceError("ERR-E1", 211 "The restricted disclaimer cannot be empty") 212 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 213 minfo.setProtectionDisclaimerRestricted(self._value) 214 215 def _handleGet(self): 216 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 217 return minfo.getProtectionDisclaimerRestricted() 192 218 193 219 methodMap = { … … 203 229 "groups.removeMember": GroupRemoveMember, 204 230 205 "merge.getCompleteUserInfo": MergeGetCompleteUserInfo 231 "merge.getCompleteUserInfo": MergeGetCompleteUserInfo, 232 233 "protection.editProtectionDisclaimerProtected": EditProtectionDisclaimerProtected, 234 "protection.editProtectionDisclaimerRestricted": EditProtectionDisclaimerRestricted 206 235 } -
indico/MaKaC/webinterface/pages/admins.py
r4a686c r32f43b 120 120 urlHandlers.UHAdminsSystem.getURL()) 121 121 mainSection.addItem( self._systemMenuItem) 122 123 self._protectionMenuItem = wcomponents.SideMenuItem(_("Protection"), 124 urlHandlers.UHAdminsProtection.getURL()) 125 mainSection.addItem( self._protectionMenuItem) 122 126 123 127 self._sideMenu.addSection(mainSection) … … 2641 2645 vars["analyticsFormURL"] = urlHandlers.UHSaveAnalytics.getURL() 2642 2646 return vars 2647 2648 class WPAdminProtection( WPAdminsBase ): 2649 2650 def _setActiveSideMenuItem(self): 2651 self._protectionMenuItem.setActive() 2652 2653 def _getPageContent( self, params ): 2654 wc = WAdminProtection() 2655 return wc.getHTML() 2656 2657 class WAdminProtection(wcomponents.WTemplated): 2658 2659 def getVars( self ): 2660 vars = wcomponents.WTemplated.getVars( self ) 2661 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 2662 vars["protectionDisclaimerProtected"] = minfo.getProtectionDisclaimerProtected() 2663 vars["protectionDisclaimerRestricted"] = minfo.getProtectionDisclaimerRestricted() 2664 return vars -
indico/MaKaC/webinterface/rh/admins.py
r7910eb r32f43b 592 592 p = admins.WPAdminsConferenceStyles( self ) 593 593 return p.display() 594 595 class RHAdminProtection( RHAdminBase ): 596 _uh = urlHandlers.UHDomains 597 598 def _checkParams( self, params ): 599 RHAdminBase._checkParams( self, params ) 600 601 def _process( self ): 602 p = admins.WPAdminProtection( self ) 603 return p.display() -
indico/MaKaC/webinterface/tpls/ProtectionWidget.tpl
rbbbf7f r32f43b 2 2 <div id="protectionWidget" style="display:none" class="protectionWidget"> 3 3 <div class="protectionWidgetSection"> 4 <div>${_("The information here displayed is")} 5 <span class="protectionHighlight${protection[0]}">${protection[1].upper()}</span><br/></div> 6 <div style="padding-top:10px; text-align:justify"> 7 ${_("""The elements on this page are no viewable by the general public. The <a href="https://security.web.cern.ch/" target="blank">CERN Security Policy</a> binds you to treat such data confidientially as denoted in the policy itself.""")} 8 </div> 4 % if protection[0] == "Protected": 5 ${_("The information on this web page is restricted for display on the %s") % protection[1]} 6 % else: 7 ${_("The information on this web page is restricted for display to named individuals or specific groups.")} 8 % endif 9 </div> 10 <div class="protectionWidgetSection"> 11 % if protection[0] == "Protected": 12 ${protectionDisclaimerProtected} 13 % else: 14 ${protectionDisclaimerRestricted} 15 % endif 9 16 </div> 10 17 <div class="protectionWidgetSection"> … … 23 30 24 31 style: { 25 width: '2 00px',32 width: '250px', 26 33 classes: 'ui-tooltip-rounded ui-tooltip-shadow ui-tooltip-popup', 27 34 tip: { -
indico/MaKaC/webinterface/tpls/SessionBar.tpl
ra20e62 r32f43b 9 9 %> 10 10 11 <div id="sessionBar" class=" ui-follow-scrollsessionBar${" sessionBarDark" if dark_ == True else ""}">11 <div id="sessionBar" class="${'ui-follow-scroll' if target and not isFrontPage and protection[0] != 'Public' else ''} sessionBar${" sessionBarDark" if dark_ == True else ""}"> 12 12 % if isFrontPage or not target or protection == "Public": 13 13 <div class="corner"></div> -
indico/MaKaC/webinterface/urlHandlers.py
r0ef4a4 r32f43b 1952 1952 class UHAdminsSystemModif( URLHandler ): 1953 1953 _relativeURL = "adminSystem.py/modify" 1954 1955 class UHAdminsProtection( URLHandler ): 1956 _relativeURL = "adminProtection.py" 1954 1957 1955 1958 class UHMaterialModification( URLHandler ): -
indico/MaKaC/webinterface/wcomponents.py
rbbbf7f r32f43b 317 317 def _getProtection(self, target): 318 318 if not target.hasAnyProtection(): 319 return ["Public", "Public"]319 return ["Public", _("Public")] 320 320 if target.isItselfProtected(): 321 return ["Restricted", "Restricted"]321 return ["Restricted", _("Restricted")] 322 322 if target.getDomainList() != []: 323 return ["Protected", "%s domain only"%(", ".join(map(lambda x: x.getName(), target.getDomainList())))]323 return ["Protected", _("%s domain only")%(", ".join(map(lambda x: x.getName(), target.getDomainList())))] 324 324 return self._getProtection(target.getOwner()) 325 325 … … 389 389 minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 390 390 vars['roomBooking'] = minfo.getRoomBookingModuleActive() 391 391 vars['protectionDisclaimerProtected'] = minfo.getProtectionDisclaimerProtected() 392 vars['protectionDisclaimerRestricted'] = minfo.getProtectionDisclaimerRestricted() 392 393 #Build a list of items for the administration menu 393 394 adminList = AdminList.getInstance()
Note: See TracChangeset
for help on using the changeset viewer.
