mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-15 18:05:50 +01:00
(refs #1511)Fix bug in updating group information
This commit is contained in:
@@ -272,7 +272,7 @@ trait SystemSettingsControllerBase extends AccountManagementControllerBase {
|
|||||||
}
|
}
|
||||||
}.toList){ case (groupName, members) =>
|
}.toList){ case (groupName, members) =>
|
||||||
getAccountByUserName(groupName, true).map { account =>
|
getAccountByUserName(groupName, true).map { account =>
|
||||||
updateGroup(groupName, form.url, form.description, form.isRemoved)
|
updateGroup(groupName, form.description, form.url, form.isRemoved)
|
||||||
|
|
||||||
if(form.isRemoved){
|
if(form.isRemoved){
|
||||||
// Remove from GROUP_MEMBER
|
// Remove from GROUP_MEMBER
|
||||||
|
|||||||
@@ -166,8 +166,8 @@ trait AccountService {
|
|||||||
|
|
||||||
def updateGroup(groupName: String, description: Option[String], url: Option[String], removed: Boolean)(implicit s: Session): Unit =
|
def updateGroup(groupName: String, description: Option[String], url: Option[String], removed: Boolean)(implicit s: Session): Unit =
|
||||||
Accounts.filter(_.userName === groupName.bind)
|
Accounts.filter(_.userName === groupName.bind)
|
||||||
.map(t => (t.url.?, t.description.?, t.removed))
|
.map(t => (t.url.?, t.description.?, t.updatedDate, t.removed))
|
||||||
.update(url, description, removed)
|
.update(url, description, currentDate, removed)
|
||||||
|
|
||||||
def updateGroupMembers(groupName: String, members: List[(String, Boolean)])(implicit s: Session): Unit = {
|
def updateGroupMembers(groupName: String, members: List[(String, Boolean)])(implicit s: Session): Unit = {
|
||||||
GroupMembers.filter(_.groupName === groupName.bind).delete
|
GroupMembers.filter(_.groupName === groupName.bind).delete
|
||||||
|
|||||||
Reference in New Issue
Block a user