mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Merge pull request #38 from marcelklehr/feature/disable-cal-invitations-for-resources
Allow disabling calendar invitations to resources
This commit is contained in:
commit
470b989672
@ -507,9 +507,18 @@ class calendar_boupdate extends calendar_bo
|
||||
*/
|
||||
public function check_acl_invite($uid)
|
||||
{
|
||||
if (!is_numeric($uid)) return true; // nothing implemented for resources so far
|
||||
|
||||
if (!$this->require_acl_invite)
|
||||
if (!is_numeric($uid))
|
||||
{
|
||||
$resources_config = Api\Config::read('resources');
|
||||
if ($resources_config['bookingrequests'] === 'disabled') {
|
||||
$ret = $this->check_perms(resources_acl_bo::DIRECT_BOOKING, 0, $uid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ret = true;
|
||||
}
|
||||
}
|
||||
elseif (!$this->require_acl_invite)
|
||||
{
|
||||
$ret = true; // no grant required
|
||||
}
|
||||
|
@ -17,6 +17,16 @@
|
||||
<option value="no">No</option>
|
||||
</select>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Booking requests" span="all" class="subHeader"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Allow booking requests from any user when creating events?"/>
|
||||
<select id="newsettings[bookingrequests]">
|
||||
<option value="disabled">No, users will need to contact users with direct booking permission</option>
|
||||
<option value="">Yes</option>
|
||||
</select>
|
||||
</row>
|
||||
<row>
|
||||
<description value="History logging" span="all" class="subHeader"/>
|
||||
</row>
|
||||
|
Loading…
Reference in New Issue
Block a user