#1211 show groups when user mngt is turned off
Merged 7 years ago by pingou. Opened 7 years ago by vivekanand1101.
vivekanand1101/pagure groups  into  master

file modified
+2 -3
@@ -24,8 +24,6 @@ 

  @pagure.APP.route('/groups')

  def group_lists():

      ''' List all the groups associated with all the projects. '''

-     if not pagure.APP.config.get('ENABLE_USER_MNGT', True):

-         flask.abort(404)

  

      group_type = 'user'

      if pagure.is_admin():
@@ -55,7 +53,8 @@ 

  @pagure.APP.route('/group/<group>', methods=['GET', 'POST'])

  def view_group(group):

      ''' Displays information about this group. '''

-     if not pagure.APP.config.get('ENABLE_USER_MNGT', True):

+     if flask.request.method == 'POST' and \

+         not pagure.APP.config.get('ENABLE_USER_MNGT', True):

          flask.abort(404)

  

      group_type = 'user'

no initial comment

:thumbsup: I'll merge it but we'll need to also check the template to hide the buttons when needed :)

Pull-Request has been merged by pingou

7 years ago
Metadata