57 $this->rule_id = $a_rule_id;
63 $this->rule_id = $a_id;
73 $this->role_id = $a_id;
83 $this->attribute_name = $a_name;
93 $this->attribute_value = $a_value;
103 $this->plugin_active = $a_status;
113 $this->add_on_update = $a_status;
123 $this->remove_on_update = $a_status;
133 $this->plugin_id = $a_id;
147 return $lng->txt(
'shib_plugin_id').
': '.$this->
getPluginId();
185 public function delete()
189 $query =
"DELETE FROM shib_role_assignment ".
190 "WHERE rule_id = ".$this->db->quote($this->
getRuleId() ,
'integer');
191 $ilDB->manipulate(
$query);
199 $next_id = $ilDB->nextId(
'shib_role_assignment');
200 $query =
"INSERT INTO shib_role_assignment (rule_id,role_id,name,value,plugin,plugin_id,add_on_update,remove_on_update ) ".
202 $ilDB->quote($next_id,
'integer').
', '.
203 $this->db->quote($this->
getRoleId(),
'integer').
', '.
204 $this->db->quote($this->
getName(),
'text').
', '.
205 $this->db->quote($this->
getValue(),
'text').
', '.
207 $this->db->quote((
int) $this->
getPluginId(),
'integer').
', '.
211 $ilDB->manipulate(
$query);
213 $this->
setRuleId($this->db->getLastInsertId());
221 $query =
"UPDATE shib_role_assignment ".
222 "SET role_id = ".$this->db->quote($this->
getRoleId(),
'integer').
', '.
223 "name = ".$this->db->quote($this->
getName(),
'text').
', '.
224 "value = ".$this->db->quote($this->
getValue(),
'text').
', '.
225 "plugin = ".$this->db->quote((
int) $this->
isPluginActive(),
'integer').
', '.
226 "plugin_id = ".$this->db->quote((
int) $this->
getPluginId(),
'integer').
', '.
229 "WHERE rule_id = ".$this->db->quote($this->
getRuleId(),
'integer');
230 $ilDB->manipulate(
$query);
239 include_once
'./Services/AuthShibboleth/classes/class.ilShibbolethRoleAssignmentRules.php';
243 if(!isset($a_data[$this->
getName()]))
248 $values = $a_data[$this->
getName()];
250 if(is_array($values))
252 return in_array($this->
getValue(),$values);
256 return $this->
getValue() == $values;
269 $query =
"SELECT * FROM shib_role_assignment ".
270 "WHERE rule_id = ".$this->db->quote($this->
getRuleId(),
'integer');