Compare commits

..

4 Commits

10 changed files with 70 additions and 68 deletions
+58 -3
View File
@@ -64,7 +64,7 @@ class AuthLib
{ {
// - The uid must be NOT an empty string // - The uid must be NOT an empty string
// - The current user should NOT be already logged as the given uid // - The current user should NOT be already logged as the given uid
if (!isEmptyString($uid) && $this->getAuthObj()->username != $uid) if (!isEmptyString($uid) && $this->getAuthObj()->{self::AO_USERNAME} != $uid)
{ {
$this->_ci->load->library('PermissionLib'); // Loads permissions library $this->_ci->load->library('PermissionLib'); // Loads permissions library
@@ -75,8 +75,28 @@ class AuthLib
$loginAS = $this->_createAuthObjByPerson(array('uid' => $uid)); $loginAS = $this->_createAuthObjByPerson(array('uid' => $uid));
if (isSuccess($loginAS)) if (isSuccess($loginAS))
{ {
$authObj = getData($loginAS); // get the authenticate object
// Store the new authentication object in authentication session // Store the new authentication object in authentication session
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, getData($loginAS)); setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObj);
$authObjOrigin = getSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ_ORIGIN);
// Load the LogLib
$this->_ci->load->library('LogLib');
// Setup the LogLib
$this->_ci->loglib->setConfigs(
array(
'dbLogType' => 'API', // required
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
'requestId' => 'API'
)
);
// Log into the database
$this->_ci->loglib->logInfoDB(
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has changed identity with the user "'.$authObj->{self::AO_USERNAME}.
'" and person id '.$authObj->{self::AO_PERSON_ID}
);
} }
} }
else else
@@ -105,7 +125,7 @@ class AuthLib
{ {
// - The person id must be a number // - The person id must be a number
// - The current user should NOT be already logged as the given person id // - The current user should NOT be already logged as the given person id
if (is_numeric($person_id) && $this->getAuthObj()->person_id != $person_id) if (is_numeric($person_id) && $this->getAuthObj()->{self::AO_PERSON_ID} != $person_id)
{ {
$this->_ci->load->library('PermissionLib'); // Loads permissions library $this->_ci->load->library('PermissionLib'); // Loads permissions library
@@ -124,6 +144,24 @@ class AuthLib
{ {
// Store the new authentication object in authentication session // Store the new authentication object in authentication session
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObj); setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObj);
$authObjOrigin = getSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ_ORIGIN);
// Load the LogLib
$this->_ci->load->library('LogLib');
// Setup the LogLib
$this->_ci->loglib->setConfigs(
array(
'dbLogType' => 'API', // required
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
'requestId' => 'API'
)
);
// Log into the database
$this->_ci->loglib->logInfoDB(
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has changed identity with the user "'.$authObj->{self::AO_USERNAME}.
'" and person id '.$authObj->{self::AO_PERSON_ID}
);
} }
else // if does NOT have permissions else // if does NOT have permissions
{ {
@@ -172,6 +210,22 @@ class AuthLib
// The LoginAs account is logged out // The LoginAs account is logged out
// The user is again connected with its real account // The user is again connected with its real account
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObjOrigin); setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObjOrigin);
// Load the LogLib
$this->_ci->load->library('LogLib');
// Setup the LogLib
$this->_ci->loglib->setConfigs(
array(
'dbLogType' => 'API', // required
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
'requestId' => 'API'
)
);
// Log into the database
$this->_ci->loglib->logInfoDB(
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has logout from the user "'.$authObj->{self::AO_USERNAME}.
'" and person id '.$authObj->{self::AO_PERSON_ID}
);
} }
} }
@@ -608,3 +662,4 @@ class AuthLib
return $finalUserBasicDataByUID; return $finalUserBasicDataByUID;
} }
} }
@@ -122,47 +122,6 @@ class Studiensemester_model extends DB_Model
return $this->execQuery($query, array($studiensemester_kurzbz, $limit)); return $this->execQuery($query, array($studiensemester_kurzbz, $limit));
} }
/**
* Returns the current study semester and the previous semesters of the same type (SS/WS).
*
* Example:
* - SS2026, limit 3: SS2026, SS2025, SS2024
* - WS2025, limit 2: WS2025, WS2024
*
* @param $studiensemester_kurzbz
* @param $limit
*/
public function getPreviousSameSemesterFrom($studiensemester_kurzbz, $limit = 1)
{
$qry = '
SELECT
studiensemester_kurzbz,
start,
ende
FROM
public.tbl_studiensemester
WHERE
SUBSTRING(studiensemester_kurzbz FROM 1 FOR 2) = SUBSTRING(? FROM 1 FOR 2)
AND start <= (
SELECT start
FROM public.tbl_studiensemester
WHERE studiensemester_kurzbz = ?
)
ORDER BY
start DESC
LIMIT ?
';
return $this->execQuery($qry,
[
$studiensemester_kurzbz,
$studiensemester_kurzbz,
$limit
]
);
}
/** /**
* getNearest * getNearest
*/ */
@@ -260,6 +260,7 @@ class Benutzerfunktion_model extends DB_Model
return $this->execQuery($query, $parameters_array); return $this->execQuery($query, $parameters_array);
} }
/** /**
* Get active Kompetenzfeldleitung bei UID. * Get active Kompetenzfeldleitung bei UID.
* *
@@ -295,6 +296,7 @@ class Benutzerfunktion_model extends DB_Model
return $this->execQuery($query, $parameters_array); return $this->execQuery($query, $parameters_array);
} }
public function insertBenutzerfunktion($Json) public function insertBenutzerfunktion($Json)
{ {
unset($Json['benutzerfunktion_id']); unset($Json['benutzerfunktion_id']);
@@ -27,7 +27,7 @@ export default {
return { return {
filter: false, filter: false,
studiengang_kz: false, studiengang_kz: false,
counterdate: luxon.DateTime.now().setZone(FHC_JS_DATA_STORAGE_OBJECT.timezone).toISODate() counterdate: new Date()
}; };
}, },
computed: { computed: {
@@ -259,7 +259,6 @@ export default {
<form-input <form-input
type="DatePicker" type="DatePicker"
v-model="counterdate" v-model="counterdate"
model-type="yyyy-MM-dd"
input-group input-group
:enable-time-picker="false" :enable-time-picker="false"
text-input text-input
@@ -79,7 +79,6 @@ export default {
<form-input <form-input
type="DatePicker" type="DatePicker"
v-model="data.buchungsdatum" v-model="data.buchungsdatum"
model-type="yyyy-MM-dd"
name="buchungsdatum" name="buchungsdatum"
:label="$p.t('konto/buchungsdatum')" :label="$p.t('konto/buchungsdatum')"
:enable-time-picker="false" :enable-time-picker="false"
@@ -88,7 +88,7 @@ export default {
this.data = { this.data = {
buchungstyp_kurzbz: '', buchungstyp_kurzbz: '',
betrag: '-0.00', betrag: '-0.00',
buchungsdatum: luxon.DateTime.now().setZone(FHC_JS_DATA_STORAGE_OBJECT.timezone).toISODate(), buchungsdatum: new Date(),
buchungstext: '', buchungstext: '',
mahnspanne: 30, mahnspanne: 30,
studiensemester_kurzbz: this.currentSemester, studiensemester_kurzbz: this.currentSemester,
@@ -154,7 +154,6 @@ export default {
<form-input <form-input
type="DatePicker" type="DatePicker"
v-model="data.buchungsdatum" v-model="data.buchungsdatum"
model-type="yyyy-MM-dd"
name="buchungsdatum" name="buchungsdatum"
:label="$p.t('konto/buchungsdatum')" :label="$p.t('konto/buchungsdatum')"
:enable-time-picker="false" :enable-time-picker="false"
@@ -325,7 +325,6 @@ export default {
:label="$p.t('infocenter', 'zgvDatum')" :label="$p.t('infocenter', 'zgvDatum')"
type="DatePicker" type="DatePicker"
v-model="data.zgvdatum" v-model="data.zgvdatum"
model-type="yyyy-MM-dd"
name="zgvdatum" name="zgvdatum"
no-today no-today
auto-apply auto-apply
@@ -390,7 +389,6 @@ export default {
:label="$p.t('lehre', 'zgvMasterDatum')" :label="$p.t('lehre', 'zgvMasterDatum')"
type="DatePicker" type="DatePicker"
v-model="data.zgvmadatum" v-model="data.zgvmadatum"
model-type="yyyy-MM-dd"
name="zgvmadatum" name="zgvmadatum"
no-today no-today
auto-apply auto-apply
@@ -456,7 +454,6 @@ export default {
:label="$p.t('lehre', 'zgvDoktorDatum')" :label="$p.t('lehre', 'zgvDoktorDatum')"
type="DatePicker" type="DatePicker"
v-model="data.zgvdoktordatum" v-model="data.zgvdoktordatum"
model-type="yyyy-MM-dd"
name="zgvdoktordatum" name="zgvdoktordatum"
no-today no-today
auto-apply auto-apply
+8 -16
View File
@@ -218,23 +218,15 @@ export const CoreFilterCmpt = {
}, },
columnsForFilter() { columnsForFilter() {
if (!this.filteredColumns || !this.datasetMetadata) return []; if (!this.filteredColumns || !this.datasetMetadata) return [];
const localizedColumnTitles = this.tabulator.getLang().columns;
const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale; const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale;
const filterTitles = this.filteredColumns.reduce((a, c) => {
let filterTitles; a[c.field] =
if (isTabulatorLocalized) { isTabulatorLocalized && localizedColumnTitles[c.field]
const localizedColumnTitles = this.tabulator.getLang().columns; ? localizedColumnTitles[c.field]
filterTitles = this.filteredColumns.reduce((a, c) => { : c.title;
a[c.field] = localizedColumnTitles[c.field]; return a;
return a; }, {});
}, {});
} else {
filterTitles = this.filteredColumns.reduce((a, c) => {
a[c.field] = c.title;
return a;
}, {});
}
return this.datasetMetadata.map((el) => ({ return this.datasetMetadata.map((el) => ({
...el, ...el,
...{ title: filterTitles[el.name] }, ...{ title: filterTitles[el.name] },
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB