##// END OF EJS Templates
disabled api key for anonymous users, and added api_key to rss/atom links for other users
marcink -
r1122:31e82d87 beta
parent child Browse files
Show More
@@ -246,7 +246,7 b' class AuthUser(object):'
246 246 def propagate_data(self):
247 247 user_model = UserModel()
248 248 self.anonymous_user = user_model.get_by_username('default', cache=True)
249 if self._api_key:
249 if self._api_key and self._api_key != self.anonymous_user.api_key:
250 250 #try go get user by api key
251 251 log.debug('Auth User lookup by API KEY %s', self._api_key)
252 252 user_model.fill_data(self, api_key=self._api_key)
@@ -107,10 +107,18 b''
107 107 </td>
108 108 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
109 109 <td>
110 %if c.rhodecode_user.username != 'default':
111 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a>
112 %else:
110 113 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_icon" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
114 %endif:
111 115 </td>
112 116 <td>
117 %if c.rhodecode_user.username != 'default':
118 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'],api_key=c.rhodecode_user.api_key)}"></a>
119 %else:
113 120 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_icon" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
121 %endif:
114 122 </td>
115 123 </tr>
116 124 %endfor
@@ -165,8 +165,13 b''
165 165 <label>${_('Feeds')}:</label>
166 166 </div>
167 167 <div class="input-short">
168 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo.name),class_='rss_icon')}
168 %if c.rhodecode_user.username != 'default':
169 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo.name,api_key=c.rhodecode_user.api_key),class_='rss_icon')}
170 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo.name,api_key=c.rhodecode_user.api_key),class_='atom_icon')}
171 %else:
172 ${h.link_to(_('RSS'),h.url('rss_feed_home',repo_name=c.repo.name,class_='rss_icon')}
169 173 ${h.link_to(_('Atom'),h.url('atom_feed_home',repo_name=c.repo.name),class_='atom_icon')}
174 %endif
170 175 </div>
171 176 </div>
172 177 </div>
General Comments 0
You need to be logged in to leave comments. Login now