mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-16 20:00:39 +01:00
Only allow attendee status modification by owner
ACCOUNT_NAME is different from OWNER_ACCOUNT.
This commit is contained in:
parent
0241e3beea
commit
c779aabfae
@ -1637,7 +1637,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
private fun updateAttendees() {
|
private fun updateAttendees() {
|
||||||
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
||||||
mAttendees.forEach {
|
mAttendees.forEach {
|
||||||
it.isMe = it.email == currentCalendar?.accountName
|
it.isMe = it.email == currentCalendar?.ownerName
|
||||||
}
|
}
|
||||||
|
|
||||||
mAttendees.sortWith(compareBy<Attendee>
|
mAttendees.sortWith(compareBy<Attendee>
|
||||||
@ -1827,8 +1827,8 @@ class EventActivity : SimpleActivity() {
|
|||||||
|
|
||||||
if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) {
|
if (mEvent.id == null && isSavingEvent && attendees.isNotEmpty()) {
|
||||||
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
val currentCalendar = calDAVHelper.getCalDAVCalendars("", true).firstOrNull { it.id == mEventCalendarId }
|
||||||
mAvailableContacts.firstOrNull { it.email == currentCalendar?.accountName }?.apply {
|
mAvailableContacts.firstOrNull { it.email == currentCalendar?.ownerName }?.apply {
|
||||||
attendees = attendees.filter { it.email != currentCalendar?.accountName }.toMutableList() as ArrayList<Attendee>
|
attendees = attendees.filter { it.email != currentCalendar?.ownerName }.toMutableList() as ArrayList<Attendee>
|
||||||
status = Attendees.ATTENDEE_STATUS_ACCEPTED
|
status = Attendees.ATTENDEE_STATUS_ACCEPTED
|
||||||
relationship = Attendees.RELATIONSHIP_ORGANIZER
|
relationship = Attendees.RELATIONSHIP_ORGANIZER
|
||||||
attendees.add(this)
|
attendees.add(this)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user