mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
EventManager: add IDP login trigger and check account action
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -98,6 +98,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row trigger trigger-idp">
|
||||
<label for="idIDPEvent" class="col-sm-2 col-form-label">IDP Login event</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control selectpicker" id="idIDPEvent" name="idp_login_event">
|
||||
<option value="0" {{if eq .Rule.Conditions.IDPLoginEvent 0}}selected{{end}}>Any</option>
|
||||
<option value="1" {{if eq .Rule.Conditions.IDPLoginEvent 1}}selected{{end}}>User login</option>
|
||||
<option value="2" {{if eq .Rule.Conditions.IDPLoginEvent 2}}selected{{end}}>Admin login</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card bg-light mb-3 trigger trigger-schedule">
|
||||
<div class="card-header">
|
||||
<b>Schedules</b>
|
||||
@@ -196,7 +207,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card bg-light mb-3 trigger trigger-fs trigger-provider trigger-schedule trigger-on-demand">
|
||||
<div class="card bg-light mb-3 trigger trigger-fs trigger-provider trigger-schedule trigger-on-demand trigger-idp">
|
||||
<div class="card-header">
|
||||
<b>Name filters</b>
|
||||
</div>
|
||||
@@ -438,7 +449,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
<b>Actions</b>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-title mb-4">One or more actions to execute. The "Execute sync" options is supported for upload events and required for pre-* events</h6>
|
||||
<h6 class="card-title mb-4">One or more actions to execute. The "Execute sync" options is supported for upload events and required for pre-* events and Identity provider login events if the action checks the account</h6>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-12 form_field_action_outer">
|
||||
{{range $idx, $val := .Rule.Actions}}
|
||||
@@ -727,6 +738,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
case '6':
|
||||
$('.trigger-on-demand').show();
|
||||
break;
|
||||
case '7':
|
||||
$('.trigger-idp').show();
|
||||
break;
|
||||
default:
|
||||
console.log(`unsupported event trigger type: ${val}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user