Changeset 450 in main


Ignore:
Timestamp:
11/04/11 14:31:55 (8 years ago)
Author:
pcosquer
Message:

remove unused method stop_delegate

Location:
trunk/openPLM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/plmapp/views/main.py

    r405 r450  
    859859    return r2r('DisplayObjectManagementReplace.htm', ctx, request) 
    860860     
    861 ##########################################################################################     
    862 @handle_errors 
    863 def stop_delegate(request, obj_ref, role, sign_level): 
    864     """ 
    865     Manage html page to stop delegations of (:class:`DelegationLink` with) the selected :class:`~django.contrib.auth.models.User`. 
    866     It computes a context dictionnary based on 
    867      
    868     :param request: :class:`django.http.QueryDict` 
    869     :param obj_ref: :attr:`~django.contrib.auth.models.User.username` 
    870     :type obj_ref: str 
    871     :param role: :attr:`.DelegationLink.role` if role is not "sign" 
    872     :type role: str 
    873     :param sign_level: used for :attr:`.DelegationLink.role` if role is "sign" 
    874     :type sign_level: str 
    875     :return: a :class:`django.http.HttpResponse` 
    876     """ 
    877     obj, ctx = get_generic_data(request, "User", obj_ref) 
    878      
    879     if request.method == "POST": 
    880         delegation_form = SelectUserForm(request.POST) 
    881         if delegation_form.is_valid(): 
    882             if delegation_form.cleaned_data["type"] == "User": 
    883                 user_obj = get_obj_from_form(delegation_form, request.user) 
    884                 if role == "notified": 
    885                     obj.set_role(user_obj.object, "notified") 
    886                     return HttpResponseRedirect("..") 
    887                 elif role == "owner": 
    888                     return HttpResponseRedirect("..") 
    889                 elif role == "sign": 
    890                     if sign_level == "all": 
    891                         return HttpResponseRedirect("..") 
    892                     elif sign_level.is_digit(): 
    893                         return HttpResponseRedirect("../..") 
    894     else: 
    895         delegation_form = SelectUserForm() 
    896     action_message_string = _("Select the user you no longer want for your \"%s\" role delegation :") % role 
    897      
    898     ctx.update({'current_page':'parts-doc-cad', 
    899                 'replace_management_form': delegation_form, 
    900                 'action_message': action_message_string}) 
    901     return r2r('DisplayObjectManagementReplace.htm', ctx, request) 
    902861     
    903862########################################################################################## 
  • trunk/openPLM/urls.py

    r410 r450  
    134134                    {'sign_level':'none'}), 
    135135    (r'delegation/delegate/(?P<role>[^/]+)/(?P<sign_level>\d+|all)/$', delegate), 
    136     (r'delegation/stop_delegate/(?P<role>[^/]+)/$', stop_delegate,\ 
    137                     {'sign_level':'none'}), 
    138     (r'delegation/stop_delegate/(?P<role>[^/]+)/(?P<sign_level>\d+|all)/$', 
    139                     stop_delegate), 
    140136    (r'modify/$', modify_user), 
    141137    (r'password/$', change_user_password), 
Note: See TracChangeset for help on using the changeset viewer.