Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117757864
D5685.1775208516.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D5685.1775208516.diff
View Options
diff --git a/src/app/Console/Commands/Ldap/GroupCommand.php b/src/app/Console/Commands/Ldap/GroupCommand.php
new file mode 100644
--- /dev/null
+++ b/src/app/Console/Commands/Ldap/GroupCommand.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace App\Console\Commands\Ldap;
+
+use App\Console\Command;
+use App\Support\Facades\LDAP;
+
+class GroupCommand extends Command
+{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'ldap:group {action} {group}';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = "Execute actions on the ldap backend for a group";
+
+ /**
+ * Execute the console command.
+ *
+ * @return mixed
+ */
+ public function handle()
+ {
+ $action = $this->argument('action');
+ $group = $this->getGroup($this->argument('group'));
+
+ if (!$group) {
+ $this->error("Group not found.");
+ return 1;
+ }
+
+ if ($action == "create") {
+ LDAP::createGroup($group);
+ }
+ if ($action == "update") {
+ LDAP::updateGroup($group);
+ }
+ if ($action == "delete") {
+ LDAP::deleteGroup($group);
+ }
+ }
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 9:28 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823157
Default Alt Text
D5685.1775208516.diff (1 KB)
Attached To
Mode
D5685: ldap:group command
Attached
Detach File
Event Timeline