~ubuntu-core-dev/update-notifier/ubuntu

« back to all changes in this revision

Viewing changes to src/hooks.c

  • Committer: Michael Vogt
  • Date: 2008-10-17 09:20:12 UTC
  • Revision ID: michael.vogt@ubuntu.com-20081017092012-7bk0w0h5rmor0ce0
* src/hooks.c:
  - add optional "OnlyAdminUsers" key (defaults to "true")
    so that non-admin users get not swamped with old 
    notifications after the ugprade to intrepid

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
   }
463
463
   struct rfc822_header *rfc822 = rfc822_parse_stanza(f);
464
464
 
 
465
   // check if its a note that is relevant only for admin users
 
466
   // (this is the default)
 
467
   gchar *b = rfc822_header_lookup(rfc822, "OnlyAdminUsers");
 
468
   if(b == NULL || g_ascii_strncasecmp(b, "true",-1) == 0) {
 
469
      if (!in_admin_group())
 
470
         return FALSE;
 
471
   }
 
472
 
465
473
   // check the DontShowAfterReboot flag
466
 
   gchar *b = rfc822_header_lookup(rfc822, "DontShowAfterReboot");
 
474
   b = rfc822_header_lookup(rfc822, "DontShowAfterReboot");
467
475
   if(b != NULL && g_ascii_strncasecmp(b, "true",-1) == 0) {
468
476
      g_debug("found DontShowAfterReboot");
469
477