Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Duplicate roles after update even though no duplicates in database

Anyone see duplicate role in /dashboard/role?

I had a look in the database and it is not duplicated

*************************** 1. row ***************************
      RoleID: 2
        Name: Guest
 Description: Guests can only view content. Anyone browsing the site who is not signed in is considered to be a "Guest".
        Type: guest
        Sort: 13
   Deletable: 1
  CanSession: 0
PersonalInfo: 0
*************************** 2. row ***************************
      RoleID: 3
        Name: Confirm Email
 Description: Users must confirm their emails before becoming full members. They get assigned to this role.
        Type: NULL
        Sort: 19
   Deletable: 1
  CanSession: 1
PersonalInfo: 0
*************************** 3. row ***************************
      RoleID: 4
        Name: Applicant
 Description: Users who have applied for membership, but have not yet been accepted. They have the same permissions as guests.
        Type: applicant
        Sort: 6
   Deletable: 1
  CanSession: 1
PersonalInfo: 0
*************************** 4. row ***************************
      RoleID: 8
        Name: Member
 Description: Members can participate in discussions, upload and download files.
        Type: unconfirmed
        Sort: 25
   Deletable: 1
  CanSession: 1
PersonalInfo: 0
*************************** 5. row ***************************
      RoleID: 16
        Name: Administrator
 Description: Administrators have permission to do anything.
        Type: NULL
        Sort: 31
   Deletable: 1
  CanSession: 1
PersonalInfo: 0
*************************** 6. row ***************************
      RoleID: 32
        Name: Moderator
 Description: Moderators have permission to edit most content.
        Type: NULL
        Sort: 38
   Deletable: 1
  CanSession: 1
PersonalInfo: 0
*************************** 7. row ***************************
      RoleID: 33
        Name: Super Moderator
 Description: Super Moderators have one more power apart from Moderators. They can ban a member.
        Type: NULL
        Sort: 7
   Deletable: 1
  CanSession: 1
PersonalInfo: 0

dashboard/user is empty if not searching although that may be by design.

grep is your friend.

Comments

  • Options

    All addons disabled same result.

    grep is your friend.

  • Options
    x00x00 MVP
    edited November 2015

    This is caused by duplicates (probably becuase of porter use). There shouldn't duplicate permissions

    (RoleID, JunctionTable, JunctionColumn, JunctionID) should be treated as a unique index but this is not enforced in the database.

    This can be solved through

    INSERT INTO GDN_Permission_temp select * from GDN_Permission GROUP BY RoleID, JunctionTable, JunctionColumn, JunctionID;
    RENAME TABLE GDN_Permission TO GDN_Permission_dupes; RENAME TABLE GDN_Permission_temp TO GDN_Permission;
    

    You could create an index

    ALTER TABLE `GDN_Permission` ADD UNIQUE `perm_unique_index` (RoleID, JunctionTable, JunctionColumn, JunctionID);
    

    grep is your friend.

Sign In or Register to comment.