Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16527

Add role_exists to migration tools

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.2-RC1
    • 3.3.0
    • Migrations
    • None

      Add a permissions tool method "role_exists"

       

      Sometimes there are users who delete core phpBB roles, and when they try to install an extension that sets permissions on that deleted role, all the migration currently does is throw an exception which causes the install to fail. And that causes support requests for the author.

       

      A role exists method would allow the ext author to check if a role esists before setting a permission on it:

      array('if', array(
          array('permission.role_exists', array('ROLE_USER_STANDARD')),
          array('permission.permission_set', array('ROLE_USER_STANDARD', 'u_foo')),
      )),
      

       

            Marc Marc
            MattF Matt Friedman
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: