Changeset 1119 in main


Ignore:
Timestamp:
05/23/12 13:12:06 (7 years ago)
Author:
pcosquer
Message:

merge commits [1117] and [1118]

Location:
trunk/openPLM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM

  • trunk/openPLM/plmapp/controllers/plmobject.py

    r1114 r1119  
    285285 
    286286    def check_in_group(self, user, raise_=True): 
     287        """ 
     288        .. versionadded:: 1.0.1 
     289 
     290        Checks that *user* belongs to the object's group. 
     291         
     292        Returns True if the user belongs to the group. 
     293        Otherwise, returns False if *raise_* is False or raises 
     294        a :exc:`.PermissionError` if *raise_* is True. 
     295 
     296        Note that it always returns True if *user* is the company. 
     297        """ 
    287298        if user.username == settings.COMPANY: 
    288299            return True 
     
    387398        :raise: :exc:`ValueError` if *new_owner* is the company and the  
    388399                object is editable 
     400 
     401        .. versionchanged:: 1.0.1 
     402 
     403        :raise: :exc:`.PermissionError` if *new_owner* does not belong to 
     404                the object's group. 
    389405        """ 
    390406         
     
    419435        :raise: :exc:`IntegrityError` if *new_notified* is already notified 
    420436            when :attr:`object` changes 
     437 
     438        .. versionchanged:: 1.0.1 
     439 
     440        :raise: :exc:`.PermissionError` if *new_notified* does not belong to 
     441                the object's group. 
    421442        """ 
    422443        if new_notified != self._user: 
     
    458479        :raise: :exc:`.PermissionError` if *signer* is not a contributor 
    459480        :raise: :exc:`.PermissionError` if *role* is invalid (level to high) 
     481 
     482        .. versionchanged:: 1.0.1 
     483 
     484        :raise: :exc:`.PermissionError` if *signer* does not belong to 
     485                the object's group. 
    460486        """ 
    461487 
  • trunk/openPLM/plmapp/templatetags/plmapp_tags.py

    r1109 r1119  
    130130# but we may have to hide something like user@<em>domain</em> 
    131131# it is only use to hide an email 
    132 _email_rx = re.compile(r"\b[\w.>_<%+-]+@[\w_<>]+\.[\w_><]+\b") 
     132_email_rx = re.compile(r"\b[\w.>_<%+-]+@[\w_<>-]+(\.[\w_><-]+)+\b") 
    133133@register.filter 
    134134def hide_emails(text): 
Note: See TracChangeset for help on using the changeset viewer.