GEWIS / gewisweb

GEWIS Website
https://gewis.nl
GNU General Public License v3.0
16 stars 33 forks source link

Streamline checking abrogation/discharge dates #1862

Open tomudding opened 1 month ago

tomudding commented 1 month ago

Current behaviour

We use > and >= interchangeably, but we should use only one variant throughout the whole codebase.

In some other places, we do not even check whether an abrogation/discharge date is in the future; we only check null.

Desired behaviour

While meetings never happen at 00:00, the assumption in GEWISDB is that this is the case. As such, an abrogation/discharge is effective after 23:59:59.9999 the previous day. Therefore, we should always use > and not >=.

Steps to reproduce

N/A

Website version

latest

What operating are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Other information

https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Mapper/Member.php#L129 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Mapper/Organ.php#L30 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Mapper/Organ.php#L48 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Mapper/Organ.php#L61 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Model/Member.php#L671 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Model/Member.php#L858 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Model/Member.php#L863 https://github.com/GEWIS/gewisweb/blob/6710a7ad227a7842052c3478479a701734f9572b/module/Decision/src/Service/Organ.php#L389

tomudding commented 1 month ago

https://github.com/GEWIS/gewisweb/blob/7f402fe0d2fe32430ded2ac9e931e3ea7a99cf4e/module/User/src/Permissions/Assertion/IsOrganMember.php#L71