1. Ruby / Говнокод #8791

    −99

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    # Return all the permissions that can be given to the role
      def for_set_permissions
        permissions = Abt::AccessControl.permissions
        permissions = Abt::AccessControl.user_permissions      if self.builtin == BUILTIN_USER
        permissions = Abt::AccessControl.manager_permissions   if self.builtin == BUILTIN_MANAGER
        permissions = Abt::AccessControl.architect_permissions if self.builtin == BUILTIN_ARCHITECT
        permissions = Abt::AccessControl.designer_permissions  if self.builtin == BUILTIN_DESIGNER
        permissions = Abt::AccessControl.customer_permissions  if self.builtin == BUILTIN_CUSTOMER
        permissions = Abt::AccessControl.vendor_permissions    if self.builtin == BUILTIN_VENDOR
        permissions = Abt::AccessControl.dealer_permissions    if self.builtin == BUILTIN_DEALER
        permissions - Abt::AccessControl.public_permissions
      end

    Сурово

    Запостил: opak, 10 Декабря 2011

    Комментарии (1) RSS

    Добавить комментарий