Manually ran the following  Behat test:

@javascript @core @core_view
Feature: Edit and delete Forum nbuttons are not displayed for normal users
    As a normal user and not the author
    I should not be able to see edit and delete buttons
    because I do not have permissions

Background:
Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | 
authname | role |
    | UserA | Kupuhipa1 | us...@example.org | Angela | User | mahara | internal 
| member |
    | UserB | Kupuhipa1 | us...@example.org | Bob | User | mahara | internal | 
member |

And the following "groups" exist:
      | name | owner | description | grouptype | open | invitefriends | 
editroles | submittableto | allowarchives | members | staff |
      | GroupA | UserA | GroupA owned by UserA | standard | ON | ON | all | ON 
| ON | UserA, UserB | UserA |
      | GroupB | UserB | GroupB owned by UserB | standard | ON | ON | all | ON 
| ON | UserB, UserA | UserB |

Scenario: Normal members should not see edit/delete forum buttons
 Given I log in as "UserA" with password "Kupuhipa1"
 And I am on "/group/view.php?id=1"
 When I follow "Forums"
 # The following line does not run
 Then I should see "Forums | Group A"
 And I should not see "Edit \"General discussion\""
 And I should not see "Delete \"General discussion\""

 Scenario: Group owner should see edit/delete forum buttons
 Given I log in as "UserB" with password "Kupuhipa1"
 And I am on "/group/view.php?id=2"
 When I follow "Forums"
 # The following line does not run
 Then I should see "Forums | Group B"
  And I should see "Edit \"General discussion\""
 And I should see "Delete \"General discussion\""

Catalyst QA Approved ✔

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1752442

Title:
  Problems with group forums / topics

Status in Mahara:
  In Progress
Status in Mahara 16.10 series:
  Confirmed
Status in Mahara 17.04 series:
  Confirmed
Status in Mahara 17.10 series:
  Confirmed
Status in Mahara 18.04 series:
  In Progress

Bug description:
  In master:
  - the edit/delete buttons for a forum display to normal members (even though 
they can't edit/delete a forum)
  - the ability to subscribe / unsubscribe to a topic in a forum has gone away 
but the 'i' help still remains

  These need to be fixed up

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1752442/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to