Changeset 6198


Ignore:
Timestamp:
05/15/12 16:29:47 (12 years ago)
Author:
acoutinho
Message:

Ticket #2740 - Editar/excluir eventos em contas compartilhadas somente leitura

Location:
trunk/prototype/modules/calendar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/calendar/js/calendar.codecs.js

    r6182 r6198  
    601601            }; 
    602602 
     603            var isShared = !objEvent.id ? false : (!!objEvent.calendar) && parseInt(Calendar.signatureOf[objEvent.calendar].isOwner) ? false : true; 
     604 
     605 
    603606            return { 
    604607                "class": objEvent["class"], 
     
    682685                alarms: !!participantInfo.user ? participantInfo.user.alarms : [], 
    683686                status: !!participantInfo.user ? participantInfo.user.status : 1, 
    684                 acl: !!participantInfo.user ? constantAcl(participantInfo.user.acl) : ( ( !objEvent.id || isAttendee ) ? constantAcl( 'rowi' ) : constantAcl( 'r' )), 
    685                 isShared: !this.id ? false : (!!objEvent.calendar) && parseInt(Calendar.signatureOf[objEvent.calendar].isOwner) ? false : true, 
    686                 isAttendee: (isAttendee ? true : (objEvent.id && !this.isShared ? false : true)), 
    687                 me: ((!objEvent.id) || ( objEvent.id && isAttendee)) ? (!!participantInfo.user ? DataLayer.merge(participantInfo.user, me) : DataLayer.merge(this.isShared ? this.organizer :  me, { 
    688                     acl:  !this.isShared ? 'rowi' : Calendar.signatureOf[objEvent.calendar].permission.aclValues,  
     687                acl: isShared ? constantAcl(Calendar.signatureOf[objEvent.calendar].permission.aclValues) : (!!participantInfo.user ? constantAcl(participantInfo.user.acl) : ( ( !objEvent.id || isAttendee ) ? constantAcl( 'rowi' ) : constantAcl( 'r' ))), 
     688                isShared: isShared, 
     689                isAttendee: (isAttendee ? true : (objEvent.id && isShared ? false : true)), 
     690                me: ((!objEvent.id) || ( objEvent.id && isAttendee)) ? (!!participantInfo.user ? DataLayer.merge(participantInfo.user, me) : DataLayer.merge(isShared ? participantInfo.organizer :  me, { 
     691                    acl:  !isShared ? 'rowi' : Calendar.signatureOf[objEvent.calendar].permission.aclValues,  
    689692                    delegatedFrom: 0,  
    690693                    receiveNotification: 1 
  • trunk/prototype/modules/calendar/templates/event_add.ejs

    r6066 r6198  
    7272                        <%  
    7373                          for (var i=0; i< data.event.calendars.length; i++) { 
     74                            if(data.event.calendars[i].id != data.event.calendar && Calendar.signatureOf[data.event.calendars[i].id].isOwner != '1' && !Calendar.signatureOf[data.event.calendars[i].id].permission.acl.write) 
     75                                continue; 
    7476                        %> 
    7577                              <option value="<%= data.event.calendars[i].id %>" <%= data.event.calendars[i].id == data.event.calendar ? 'selected="selected"':'' %>> 
Note: See TracChangeset for help on using the changeset viewer.