Changeset 94242c in indico


Ignore:
Timestamp:
03/16/11 18:37:31 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
9f305e
Parents:
458c17
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (03/16/11 17:52:19)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (03/16/11 18:37:31)
Message:

[FIX] Livesync - missing notifications

  • Category modifications were being silently ignored due to an added "continue";
  • Fixed ACL modification that didn't get to metadata;
  • Commented out access control code that is still only half-implemented;
Location:
indico/ext/livesync
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • indico/ext/livesync/bistate.py

    rff6158 r94242c  
    9393            obj = aw.getObject() 
    9494 
    95             if  isinstance(obj, conference.Category) or \ 
    96                    not obj.canAccess(AccessWrapper(access)): 
    97                 # category? no access? jump over this one 
    98                 continue 
    99  
    100             if obj not in records: 
    101                 records[obj] = 0 
     95            ## TODO: enable this, whenn config is possible from interface 
     96            ## if obj.canAccess(AccessWrapper(access)): 
     97            ##     # no access? jump over this one 
     98            ##     continue 
    10299 
    103100            for action in aw.getActions(): 
    104                 if action == 'deleted': 
     101                if action == 'deleted' and not isinstance(obj, conference.Category): 
    105102                    # if the record has been deleted, mark it as such 
    106103                    # nothing else will matter 
    107                     records[obj] |= STATUS_DELETED 
     104                    cls._setStatus(records, obj, STATUS_DELETED) 
    108105 
    109                 elif action == 'created': 
     106                elif action == 'created' and not isinstance(obj, conference.Category): 
    110107                    # if the record has been created, mark it as such 
    111                     records[obj] |= STATUS_CREATED 
     108                    cls._setStatus(records, obj, STATUS_CREATED) 
    112109 
    113                 elif action in ['data_changed', 'acl_changed', 'moved']: 
    114                     # categories are ignored 
    115                     records[obj] |= STATUS_CHANGED 
    116  
    117                 elif action in ['set_private', 'set_public']: 
     110                elif action in ['set_private', 'set_public', 'data_changed', 
     111                                'acl_changed', 'moved']: 
    118112                    # protection changes have to be handled more carefully 
    119113                    cls._computeProtectionChanges(obj, action, records) 
  • indico/ext/livesync/components.py

    raa9938 r94242c  
    4343from MaKaC.common.contextManager import ContextManager 
    4444from MaKaC.common.logger import Logger 
    45 from MaKaC import conference 
     45from MaKaC import conference, accessControl 
    4646 
    4747 
     
    7474                Logger.get('ext.livesync').debug((obj, action)) 
    7575                # TODO: remove redundant items 
    76                 sm.add(timestamp, 
    77                        ActionWrapper(timestamp, obj, actions)) 
     76            sm.add(timestamp, 
     77                   ActionWrapper(timestamp, obj, actions)) 
    7878 
    7979    def requestRetry(self, obj, req, nretry): 
     
    196196            else: 
    197197                self._objectInfoChanged(obj, 'acl') 
     198        elif isinstance(obj, accessControl.AccessController): 
     199            self._aclChanged(obj.getOwner(), child=False) 
    198200        else: 
    199201            self._aclChanged(obj.getOwner(), child=True) 
Note: See TracChangeset for help on using the changeset viewer.