mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-14 07:49:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b6fd67ea2 | ||
|
|
ce0fd2e7c0 | ||
|
|
e43887678e | ||
|
|
fbc88bf768 | ||
|
|
8735242e0f | ||
|
|
7c397df829 |
@@ -490,7 +490,7 @@ class Student extends FHCAPI_Controller
|
||||
$this->PersonModel->addSelect(
|
||||
'person_id, vorname, nachname, vornamen, wahlname, gebdatum, staatsbuergerschaft, geburtsnation, sprache, anrede,
|
||||
titelpost, titelpre, gebort, gebzeit, homepage, geschlecht, matr_nr,
|
||||
aktiv, tbl_geschlecht.bezeichnung_mehrsprachig AS geschlecht_bezeichnung'
|
||||
aktiv, unruly, tbl_geschlecht.bezeichnung_mehrsprachig AS geschlecht_bezeichnung'
|
||||
);
|
||||
$this->PersonModel->addJoin('public.tbl_geschlecht', 'geschlecht');
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class AuthLib
|
||||
{
|
||||
// - The uid must be NOT an empty string
|
||||
// - 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
|
||||
|
||||
@@ -75,8 +75,28 @@ class AuthLib
|
||||
$loginAS = $this->_createAuthObjByPerson(array('uid' => $uid));
|
||||
if (isSuccess($loginAS))
|
||||
{
|
||||
$authObj = getData($loginAS); // get the authenticate object
|
||||
|
||||
// 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
|
||||
@@ -105,7 +125,7 @@ class AuthLib
|
||||
{
|
||||
// - The person id must be a number
|
||||
// - 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
|
||||
|
||||
@@ -124,6 +144,24 @@ class AuthLib
|
||||
{
|
||||
// Store the new authentication object in authentication session
|
||||
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
|
||||
{
|
||||
@@ -172,6 +210,22 @@ class AuthLib
|
||||
// The LoginAs account is logged out
|
||||
// The user is again connected with its real account
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ class StudentListLib
|
||||
) || ' (' || COALESCE(tbl_prestudent.priorisierung::text, ' '::text) || ')' AS priorisierung_relativ", false);
|
||||
$this->addSelect('mentor');
|
||||
$this->addSelect('b.aktiv AS bnaktiv');
|
||||
$this->addSelect('unruly');
|
||||
|
||||
// Add default JOINs
|
||||
$this->addJoin('public.tbl_studiengang stg', 'studiengang_kz', 'LEFT');
|
||||
|
||||
@@ -225,8 +225,7 @@ export default {
|
||||
isLoading: false,
|
||||
progress: -1,
|
||||
total: -1,
|
||||
processed: -1,
|
||||
hiddenColumns: ['unruly']
|
||||
processed: -1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -393,7 +392,7 @@ export default {
|
||||
prestudent_id: capitalize(this.$p.t("ui/prestudent_id")),
|
||||
priorisierung_relativ: capitalize(this.$p.t("lehre/prioritaet")),
|
||||
mentor: capitalize(this.$p.t("stv/mentor")),
|
||||
bnaktiv: capitalize(this.$p.t("person/aktiv"))
|
||||
bnaktiv: capitalize(this.$p.t("person/aktiv")),
|
||||
};
|
||||
|
||||
/** NOTE(chris):
|
||||
@@ -821,7 +820,6 @@ export default {
|
||||
@table-built="translateTabulator"
|
||||
:useSelectionSpan="false"
|
||||
@headerFilterOn="handleHeaderFilter"
|
||||
:hidden-columns="hiddenColumns"
|
||||
>
|
||||
|
||||
|
||||
|
||||
@@ -106,10 +106,6 @@ export const CoreFilterCmpt = {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
hiddenColumns: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
@@ -220,7 +216,6 @@ export const CoreFilterCmpt = {
|
||||
|
||||
return this.$props.tabulatorOptions?.columns
|
||||
?.filter((column) => column.formatter !== "responsiveCollapse")
|
||||
?.filter((column) => !this.hiddenColumns.includes(column.field))
|
||||
.map((column) => column.field) ?? [];
|
||||
},
|
||||
idExtra() {
|
||||
|
||||
Reference in New Issue
Block a user