title: How to set this Firebase rules?
body: <p>I am stuck on how to solve the security for my app here.</p>
  
  <p>I have this structure:</p>
  
  <p><a href="https://i.stack.imgur.com/w8W3O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w8W3O.png" alt="enter image description here"></a></p>
  
  <p>Users shouldn't be able to write to points, but able to write to nickname.
  Is this possible?</p>
  
  <p>I tried this rule but it doesn't work</p>
  
  <pre><code>"Users" :{
    "$user_id" :{
      "Points" :{
        ".read" : true,
        ".write" : false
      },
      "nickname" :{
        ".read": true,
        ".write": "$user_id==auth.uid"
      }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Splitting the data to two node is a solution to one part of the problem, leaving the other part of the problem which is writing the nickname.
  Writing the nickname should only be possible by the user whom the nickname belong to, but in my code, I am asking the user to put email, pass and nickname.
  When the user is registring, the auth.uid is not available yet, I considered registering the user under temporary name and they change it later after they log in, but I am looking for a shorter solution where they get to pick the name when registering</p>
  
  <p>This is my bit of code when they register:</p>
  
  <pre><code>Ref.createUser(email, pass, 
    new Firebase.ValueResultHandler&lt;Map&lt;String, Object&gt;&gt;() {
      @Override
      public void onSuccess(Map&lt;String, Object&gt; result) {
        Ref2 = new Firebase(firebase_users_path + result.get("uid").toString());
        HashMap&lt;String, String&gt; names = new HashMap&lt;String, String&gt;();
        names.put("nickname", nickname);
        Ref2.setValue(names, new Firebase.CompletionListener() {
          @Override
          public void onComplete(FirebaseError firebaseError, Firebase firebase) {
            if (firebaseError != null) {
              Toast.makeText(MainActivity.this, "Done!", Toast.LENGTH_SHORT).show();
            } else {
              Toast.makeText(MainActivity.this, "Error!", Toast.LENGTH_SHORT).show();
            }
          }
        });
  </code></pre>
  
  <p>My code is returning Done! indicating registering is complete, I do find a new user but the nickname doesn't get written in users/uid because the auth.uid is not available yet</p>