Changeset 7958


Ignore:
Timestamp:
03/05/13 14:35:40 (7 years ago)
Author:
douglas
Message:

Ticket #3325 - Melhoria de funcionalidade na API (serviço Postgres)

Location:
branches/2.5/prototype
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/prototype/config/PostgreSQL.srv

    r7731 r7958  
    77;host = 127.0.0.1 
    88port = 5432 
    9 dbname = expresso 
    10 user = postgres 
     9dbname= expressobranches25douglas 
     10user=postgres 
    1111; Caso o usuario tenha senha... 
    1212;password= 
  • branches/2.5/prototype/config/calendarSignature.ini

    r7938 r7958  
    1414deepnessFindCalendarSignature = modules/calendar/interceptors/DBMapping.php 
    1515createDefaultGroup = modules/calendar/interceptors/DBMapping.php 
     16  
     17[before.read]  
     18calendarSignatureSecurity = modules/calendar/interceptors/DBMapping.php  
     19  
     20[before.find]  
     21calendarSignatureSecurity = modules/calendar/interceptors/DBMapping.php  
    1622 
    1723[after.read] 
  • branches/2.5/prototype/config/schedulable.ini

    r7702 r7958  
    1717 
    1818[before.find] 
     19schedulableSecurity = modules/calendar/interceptors/DBMapping.php  
    1920findDeepnessOne = modules/calendar/interceptors/DBMapping.php 
    2021findSchedulable = modules/calendar/interceptors/DBMapping.php 
     
    3435createHistoric = modules/calendar/interceptors/DBMapping.php 
    3536 
     37[before.read]  
     38schedulableSecurity = modules/calendar/interceptors/DBMapping.php  
     39  
    3640[after.read] 
    3741deepnessReadEvent = modules/calendar/interceptors/DBMapping.php 
     
    4044deleteSchedulable = modules/calendar/interceptors/DBMapping.php 
    4145deleteEvent = modules/calendar/interceptors/Notifications.php 
     46  
    4247 
    4348[PostgreSQL.mapping] 
  • branches/2.5/prototype/modules/calendar/interceptors/DBMapping.php

    r7747 r7958  
    164164 
    165165    public function encodeSignatureAlarmType(&$uri, &$params, &$criteria, $original) { 
    166         $params['type'] = self::codeAlarmType($params['type']); 
     166            $params['type'] = self::codeAlarmType($params['type']);  
     167    }  
     168  
     169    public function schedulableSecurity(&$uri, &$params, &$criteria, $original)  
     170    {  
     171        $security = 'schedulable.id = calendarToSchedulable.schedulable';  
     172        $security .= ' AND calendar.id = calendarToSchedulable.calendar';  
     173        $security .= ' AND calendar.id = calendarSignature.calendar';  
     174        $security .= ' AND calendarSignature.user = ' . base64_encode(Config::me('uidNumber'));  
     175  
     176        $criteria['condition'] = $security;  
     177    }  
     178  
     179    public function calendarSecurity(&$uri, &$params, &$criteria, $original)  
     180    {  
     181        $security = 'calendar.id = calendarSignature.calendar';  
     182        $security .= ' AND calendarSignature.user = ' . base64_encode(Config::me('uidNumber'));  
     183  
     184        $criteria['condition'] = $security;  
     185    }  
     186  
     187    public function calendarSignatureSecurity(&$uri, &$params, &$criteria, $original)  
     188    {  
     189        $security = 'calendarSignature.user = ' . base64_encode(Config::me('uidNumber'));  
     190  
     191        $criteria['condition'] = $security;  
    167192    } 
    168193 
Note: See TracChangeset for help on using the changeset viewer.