MM-25083: local mode for patchBot, getBots, enableBot, disableBot and assignBot (#14652)

* local mode for patchBot
* local mode for getBots
* local mode for enableBot and disableBot
* local mode for assignBot
Этот коммит содержится в:
Ashish Bhate
2020-06-10 15:25:14 +05:30
коммит произвёл GitHub
родитель deeba8f609
Коммит f2253df8a1
4 изменённых файлов: 216 добавлений и 101 удалений

Просмотреть файл

@@ -232,6 +232,9 @@ func (a *App) SessionHasPermissionToManageBot(session model.Session, botUserId s
if err != nil {
return err
}
if session.IsUnrestricted() {
return nil
}
if existingBot.OwnerId == session.UserId {
if !a.SessionHasPermissionTo(session, model.PERMISSION_MANAGE_BOTS) {