# Why users removed from a group still have their privileges?

**URL:** <https://meta.discourse.org/t/why-users-removed-from-a-group-still-have-their-privileges/43881>\
**Category:** Support\
**Created:** [8 Mayo, 2016 14:52 UTC](https://meta.discourse.org/t/why-users-removed-from-a-group-still-have-their-privileges/43881 "2016-05-08T14:52:39Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [9 Mayo, 2016 04:45 UTC](https://meta.discourse.org/t/why-users-removed-from-a-group-still-have-their-privileges/43881/9 "2016-05-09T04:45:28Z")

</div>

Ah, found it.

app/models/group\_user.rb has this

```plaintext
  def grant_trust_level
    return if group.grant_trust_level.nil?
    if user.trust_level < group.grant_trust_level
      user.change_trust_level!(group.grant_trust_level)
      user.trust_level_locked = true
      user.save
    end
  end

```

I guess having the code not set locked to true could be done.  
But if it wasn’t locked then any that did not meet the requirements would lose TL3 after the grace period.

I’m thinking it would be less work to unlock removed members than it would be to re-promote group members - if that needed to be done. Maybe if the locking was changed it would cycle through revoke - grant when the job ran?

---

_[View the full topic](https://meta.discourse.org/t/why-users-removed-from-a-group-still-have-their-privileges/43881)._
