           [:th "Year"]
           [:th "Rack Number"]
           [:th "Description"]
-          [:th " "]
-          [:th " "]
+          (when (is-admin-or-super-admin)[:th " "]) 
+          (when (is-admin-or-super-admin)[:th " "]) 
           ]]
         [:tbody
-         (for [mt khasragirdwanis]
-           ^{:key (.-id mt)} [:tr
-                              [:td (.-serialnumber mt)]
-                              [:td (.-villagename mt)]
-                              [:td (.-subdivisionname mt)]
-                              [:td (.-tehsil mt)]
-                              [:td (.-year mt)]
-                              [:td (.-racknumber mt)]
-                              [:td (.-description mt)]
-                              [:td [:a {:href "javascript:;"
-                                        :on-click  #(khasragirdwani-update(.-id mt))
-                                        :class "btn btn-success btn-sm glyphicon glyphicon-edit"}]]
-                              [:td  [:a {:href "javascript:;" :on-click #(khasragirdwani-delete(.-id mt))
-                                         :class "btn btn-danger btn-sm glyphicon glyphicon-remove"}]]])]]
+         (doall (for [mt khasragirdwanis]
+                  ^{:key (.-id mt)} [:tr
+                                     [:td (.-serialnumber mt)]
+                                     [:td (.-villagename mt)]
+                                     [:td (.-subdivisionname mt)]
+                                     [:td (.-tehsil mt)]
+                                     [:td (.-year mt)]
+                                     [:td (.-racknumber mt)]
+                                     [:td (.-description mt)]
+                                     (when (is-admin-or-super-admin)[:td [:a {:href "javascript:;"
+                                                                              :on-click  #(khasragirdwani-update(.-id mt))
+                                                                              :class "btn btn-success btn-sm glyphicon glyphicon-edit"}]]) 
+                                     (when (is-admin-or-super-admin)[:td  [:a {:href "javascript:;" :on-click #(khasragirdwani-delete(.-id mt))
+                                                                               :class "btn btn-danger btn-sm glyphicon glyphicon-remove"}]])]))]]
        [:div{:class "col-xs-6 col-centered col-max"} [shared-state 0]]]]]]])
 
 

          [:th "Year"]
          [:th "Rack Number"]
          [:th "Description"]
          [:th " "]
          [:th " "]
          ]]
        [:tbody
         (for [mt revenues]
           ^{:key (.-id mt)} [:tr
                              [:td (.-serialnumber mt)]
                              [:td (.-subdivisionname mt)]
                              [:td (.-villagename mt)]
                              ;; [:td (.-tehsil mt)]
                              [:td (.-year mt)]
                              [:td (.-racknumber mt)]
                              [:td (.-description mt)]
                              [:td [:a {:href "javascript:;"
                                        :on-click  #(revenue-update(.-id mt))
                                        :class "btn btn-success btn-sm glyphicon glyphicon-edit"}]]
                              [:td  [:a {:href "javascript:;" :on-click #(revenue-delete(.-id mt))
                                         :class "btn btn-danger btn-sm glyphicon glyphicon-remove"}]]])]]
       [:div{:class "col-xs-6 col-centered col-max"} [shared-state 0]]]]]]])



(defn main
  []
  (secretary/set-config! :prefix "#")
  (set-key-value :page-location [login])
  (r/render [page]
            (.getElementById js/document "app1"))
  (let [history (History.)]
