- updated new ESI scopes

- fixed SPL object data cache for "characterlog" table updates
- fixed missing "manager/admin" label for characters on /login character selection
This commit is contained in:
Mark Friedrich
2018-02-17 13:01:44 +01:00
parent ac36d5e074
commit 23749eb78c
5 changed files with 29 additions and 14 deletions

View File

@@ -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

View File

@@ -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();
}
}
/**

View File

@@ -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

View File

@@ -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

View File

@@ -1,11 +1,14 @@
<a href="{{ link }}?cookie={{ cookieName }}&tabId={{browserTabId}}">
{{#authOK}}
{{#character.roleId}}
<div class="ribbon-wrapper fade in"><div class="ribbon ribbon-blue">ADMIN</div></div>
{{/character.roleId}}
{{#isManager}}
<div class="ribbon-wrapper fade in"><div class="ribbon ribbon-blue">{{ character.role.label }}</div></div>
{{/isManager}}
{{#isAdmin}}
<div class="ribbon-wrapper fade in"><div class="ribbon ribbon-red">{{ character.role.label }}</div></div>
{{/isAdmin}}
{{/authOK}}
{{^authOK}}
<div class="ribbon-wrapper fade in"><div class="ribbon ribbon-red">{{authLabel}}</div></div>
<div class="ribbon-wrapper fade in"><div class="ribbon ribbon-orange">{{authLabel}}</div></div>
{{/authOK}}
<div class="pf-character-image-wrapper {{#hasActiveSession}}pf-character-active{{/hasActiveSession}}">