diff --git a/app/environment.ini b/app/environment.ini index 803f9daf..4291be15 100644 --- a/app/environment.ini +++ b/app/environment.ini @@ -40,8 +40,8 @@ CCP_SSO_SECRET_KEY = ; CCP ESI API CCP_ESI_URL = https://esi.tech.ccp.is CCP_ESI_DATASOURCE = singularity -CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1 -CCP_ESI_SCOPES_ADMIN = esi-corporations.read_corporation_membership.v1 +CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1 +CCP_ESI_SCOPES_ADMIN = ; SMTP settings (optional) SMTP_HOST = localhost @@ -92,8 +92,8 @@ CCP_SSO_SECRET_KEY = ; CCP ESI API CCP_ESI_URL = https://esi.tech.ccp.is CCP_ESI_DATASOURCE = tranquility -CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1 -CCP_ESI_SCOPES_ADMIN = esi-corporations.read_corporation_membership.v1 +CCP_ESI_SCOPES = esi-location.read_online.v1,esi-location.read_location.v1,esi-location.read_ship_type.v1,esi-ui.write_waypoint.v1,esi-ui.open_window.v1,esi-universe.read_structures.v1,esi-corporations.read_corporation_membership.v1 +CCP_ESI_SCOPES_ADMIN = ; SMTP settings (optional) SMTP_HOST = localhost diff --git a/app/main/model/characterlogmodel.php b/app/main/model/characterlogmodel.php index ae8c3271..87de3229 100644 --- a/app/main/model/characterlogmodel.php +++ b/app/main/model/characterlogmodel.php @@ -37,7 +37,8 @@ class CharacterLogModel extends BasicModel { ], 'systemId' => [ 'type' => Schema::DT_INT, - 'index' => true + 'index' => true, + 'activity-log' => true ], 'systemName' => [ 'type' => Schema::DT_VARCHAR128, @@ -46,7 +47,8 @@ class CharacterLogModel extends BasicModel { ], 'shipTypeId' => [ 'type' => Schema::DT_INT, - 'index' => true + 'index' => true, + 'activity-log' => true ], 'shipTypeName' => [ 'type' => Schema::DT_VARCHAR128, @@ -55,7 +57,8 @@ class CharacterLogModel extends BasicModel { ], 'shipId' => [ 'type' => Schema::DT_BIGINT, - 'index' => true + 'index' => true, + 'activity-log' => true ], 'shipMass' => [ 'type' => Schema::DT_FLOAT, @@ -69,7 +72,8 @@ class CharacterLogModel extends BasicModel { ], 'stationId' => [ 'type' => Schema::DT_INT, - 'index' => true + 'index' => true, + 'activity-log' => true ], 'stationName' => [ 'type' => Schema::DT_VARCHAR128, @@ -78,7 +82,8 @@ class CharacterLogModel extends BasicModel { ], 'structureId' => [ 'type' => Schema::DT_BIGINT, - 'index' => true + 'index' => true, + 'activity-log' => true ], 'structureName' => [ 'type' => Schema::DT_VARCHAR128, @@ -192,7 +197,10 @@ class CharacterLogModel extends BasicModel { * @param $pkeys */ public function afterUpdateEvent($self, $pkeys){ - $self->clearCacheData(); + // check if any "relevant" column has changed + if( !empty($this->fieldChanges) ){ + $self->clearCacheData(); + } } /** diff --git a/js/app/login.js b/js/app/login.js index 363d140e..3f89315f 100644 --- a/js/app/login.js +++ b/js/app/login.js @@ -665,6 +665,8 @@ define([ cookieName: this.cookieName, browserTabId: this.browserTabId, character: responseData.character, + isManager: Util.getObjVal(responseData, 'character.role.name') === 'CORPORATION', + isAdmin: Util.getObjVal(responseData, 'character.role.name') === 'SUPER', authLabel: getCharacterAuthLabel(responseData.character.authStatus), authOK: responseData.character.authStatus === 'OK', hasActiveSession: responseData.character.hasActiveSession === true diff --git a/public/js/v1.3.3/app/login.js b/public/js/v1.3.3/app/login.js index 363d140e..3f89315f 100644 --- a/public/js/v1.3.3/app/login.js +++ b/public/js/v1.3.3/app/login.js @@ -665,6 +665,8 @@ define([ cookieName: this.cookieName, browserTabId: this.browserTabId, character: responseData.character, + isManager: Util.getObjVal(responseData, 'character.role.name') === 'CORPORATION', + isAdmin: Util.getObjVal(responseData, 'character.role.name') === 'SUPER', authLabel: getCharacterAuthLabel(responseData.character.authStatus), authOK: responseData.character.authStatus === 'OK', hasActiveSession: responseData.character.hasActiveSession === true diff --git a/public/templates/ui/character_panel.html b/public/templates/ui/character_panel.html index e66d4c54..beb91e45 100644 --- a/public/templates/ui/character_panel.html +++ b/public/templates/ui/character_panel.html @@ -1,11 +1,14 @@ {{#authOK}} - {{#character.roleId}} -
ADMIN
- {{/character.roleId}} + {{#isManager}} +
{{ character.role.label }}
+ {{/isManager}} + {{#isAdmin}} +
{{ character.role.label }}
+ {{/isAdmin}} {{/authOK}} {{^authOK}} -
{{authLabel}}
+
{{authLabel}}
{{/authOK}}