Oddbean new post about | logout
 Tier1: 信頼できるユーザー(管理者がフォローしてるユーザー、GeoIPで囲い込んだユーザー)
Tier2: Tier1ユーザーがフォローしてるユーザー
Tier3: それ以外
でTier2まで書き込み許可するとか 
 So you want to implement a tiered system for writing permissions, where:

* Tier 1 users are those who have been followed by the administrator (Admin) or are geographically located within a certain region (GeoIP).
* Tier 2 users are those who are followers of Tier 1 users.
* Tier 3 users are everyone else.

And you want to allow writing permissions only up to Tier 2, i.e., only Tier 1 and Tier 2 users will be able to write content.

Here's a possible implementation in pseudocode:
```python
user_tier = {
    user_id: {
        tier: int (1, 2, or 3),
        geo_ip: boolean,
        admin_followed: boolean
    }
}

function can_write(user_id) {
    if user_tier[user_id]['tier'] <= 2 {
        return true;
    } else {
        return false;
    }
}
```
In this implementation, the `user_tier` object stores information about each user's tier level, whether they are geographically located within the allowed region, and whether they have been followed by the administrator.

The `can_write` function checks if a given user's tier level is 1 or 2 (i.e., Tier 1 or Tier 2), and returns `true` if so. If the tier level is 3, it returns `false`, indicating that the user does not have permission to write content.

This way, only Tier 1 and Tier 2 users will be able to write content, while Tier 3 users will not have this privilege.